workspaces

package
v0.0.0-...-cb9ec86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmptyWorkspace       = ""
	DefaultWorkspaceName = "default"
	SettingsFilename     = "fjira.yaml"
)

Variables

View Source
var (
	WorkspaceNotFoundErr = errors.New("workspace doesn't exist")
)

Functions

func GetCurrent

func GetCurrent() (string, error)

func NewSwitchWorkspaceView

func NewSwitchWorkspaceView() app.View

func RegisterGoTo

func RegisterGoTo()

Types

type Settings

type Settings struct {
	Current    string `json:"current" yaml:"current"`
	Workspaces map[string]WorkspaceSettings
}

type SettingsStorage

type SettingsStorage interface {
	Write(workspace string, settings *WorkspaceSettings) error
	Read(workspace string) (*WorkspaceSettings, error)
	ReadAllWorkspaces() ([]string, error)
	ReadCurrentWorkspace() (string, error)
	SetCurrentWorkspace(workspace string) error
	ConfigDir() (string, error)
}

func NewUserHomeSettingsStorage

func NewUserHomeSettingsStorage() SettingsStorage

type WorkspaceSettings

type WorkspaceSettings struct {
	JiraRestUrl   string             `json:"jiraRestUrl" yaml:"jiraRestUrl"`
	JiraToken     string             `json:"jiraToken" yaml:"jiraToken"`
	JiraUsername  string             `json:"jiraUsername" yaml:"jiraUsername"`
	JiraTokenType jira.JiraTokenType `json:"jiraTokenType" yaml:"jiraTokenType"`
	Workspace     string             `json:"-" yaml:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳