config

package
v0.0.0-...-ba4a4a7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name string
	Url  string
}

type Branch

type Branch struct {
	DisplayName string
	Color       int
}

type Config

type Config struct {
	DisableAutoUpdate bool
	AllowPreview      bool
}

type Release

type Release struct {
	Version string
	Preview bool
	Assets  []Asset
}

type Repo

type Repo struct {
	Path             string
	ShownBranches    []string
	BranchesChildren map[string][]string
}

type Service

type Service struct {
	ProgramVersion string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(programVersion, dataFolder string) *Service

func (*Service) GetConfig

func (s *Service) GetConfig() Config

func (*Service) GetRepo

func (s *Service) GetRepo(path string) Repo

func (*Service) GetState

func (s *Service) GetState() State

func (*Service) SetConfig

func (s *Service) SetConfig(setFunc func(c *Config))

func (*Service) SetRepo

func (s *Service) SetRepo(path string, setFunc func(r *Repo))

func (*Service) SetState

func (s *Service) SetState(setFunc func(s *State))

type State

type State struct {
	InstalledVersion    string
	ReleasesEtag        string
	StableRelease       Release
	PreRelease          Release
	Repos               []Repo
	RecentFolders       []string
	RecentParentFolders []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL