config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppDefaultsConfig added in v0.6.0

func GetAppDefaultsConfig(content []byte, subKey, appName string) (*model.AppDefaultsConfig, error)

func GetChannelsConfig added in v0.2.0

func GetChannelsConfig(ctx context.Context, content []byte, subKey string) (*model.ChannelsConfig, error)

func GetGHReleases added in v0.2.0

func GetGHReleases(ctx context.Context, client *github.Client, owner, repo string) ([]string, error)

func GetReleasesConfig added in v0.2.0

func GetReleasesConfig(content []byte, channelServerVersion, subKey string) (*model.ReleasesConfig, error)

func Latest

func Latest(releases []string, pattern, exclude string) (string, error)

Types

type Config

type Config struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(ctx context.Context, subKey string, wait Wait, channelServerVersion string, appName string, urls []Source) *Config

func (*Config) AppDefaultsConfig added in v0.6.0

func (c *Config) AppDefaultsConfig() *model.AppDefaultsConfig

func (*Config) ChannelsConfig added in v0.2.0

func (c *Config) ChannelsConfig() *model.ChannelsConfig

func (*Config) Redirect

func (c *Config) Redirect(id string) (string, error)

func (*Config) ReleasesConfig added in v0.2.0

func (c *Config) ReleasesConfig() *model.ReleasesConfig

type DurationWait added in v0.6.0

type DurationWait struct {
	Duration time.Duration
}

func (*DurationWait) Wait added in v0.6.0

func (d *DurationWait) Wait(ctx context.Context) bool

type Source added in v0.6.0

type Source interface {
	URL() string
}

type StringSource added in v0.6.0

type StringSource string

func (StringSource) URL added in v0.6.0

func (s StringSource) URL() string

type Wait added in v0.6.0

type Wait interface {
	Wait(ctx context.Context) bool
}

Jump to

Keyboard shortcuts

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