options

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLabOptions

type GitLabOptions struct {
	TokenPath string
}

GitLabOptions holds options for interacting with GitLab.

func NewGitLabOptions

func NewGitLabOptions() *GitLabOptions

NewGitLabOptions creates a GitLabOptions with default values.

func (*GitLabOptions) AddFlags

func (o *GitLabOptions) AddFlags(fs *flag.FlagSet)

AddFlags injects Gitlab options into the given FlagSet.

func (*GitLabOptions) AddFlagsWithoutDefaultGitLabTokenPath

func (o *GitLabOptions) AddFlagsWithoutDefaultGitLabTokenPath(fs *flag.FlagSet)

AddFlagsWithoutDefaultGitLabTokenPath injects Gitlab options into the given FlagSet without setting a default for the gitlabTokenPath, allowing to use an anonymous Gitlab client

func (GitLabOptions) Validate

func (o GitLabOptions) Validate() error

Validate validates Gitlab options.

type GiteeOptions

type GiteeOptions struct {
	TokenPath     string
	RepoCacheDir  string
	CacheRepoOnPV bool
}

GiteeOptions holds options for interacting with Gitee.

func NewGiteeOptions

func NewGiteeOptions() *GiteeOptions

NewGiteeOptions creates a GiteeOptions with default values.

func NewGithubOptions

func NewGithubOptions() *GiteeOptions

NewGithubOptions creates a GiteeOptions with default values.

func (*GiteeOptions) AddFlags

func (o *GiteeOptions) AddFlags(fs *flag.FlagSet)

AddFlags injects Gitee options into the given FlagSet.

func (*GiteeOptions) AddFlagsWithoutDefaultGiteeTokenPath

func (o *GiteeOptions) AddFlagsWithoutDefaultGiteeTokenPath(fs *flag.FlagSet)

AddFlagsWithoutDefaultGiteeTokenPath injects Gitee options into the given Flagset without setting a default for for the giteeTokenPath, allowing to use an anonymous Gitee client

func (GiteeOptions) Validate

func (o GiteeOptions) Validate() error

Validate validates Gitee options.

type GithubOptions

type GithubOptions struct {
	TokenPath string
}

GithubOptions holds options for interacting with Github.

func (*GithubOptions) AddFlags

func (o *GithubOptions) AddFlags(fs *flag.FlagSet)

AddFlags injects Gitee options into the given FlagSet.

func (*GithubOptions) AddFlagsWithoutDefaultGithubTokenPath

func (o *GithubOptions) AddFlagsWithoutDefaultGithubTokenPath(fs *flag.FlagSet)

AddFlagsWithoutDefaultGithubTokenPath injects Gitee options into the given Flagset without setting a default for for the giteeTokenPath, allowing to use an anonymous Gitee client

func (GithubOptions) Validate

func (o GithubOptions) Validate() error

Validate validates Gitee options.

type ServiceOptions

type ServiceOptions struct {
	Port        int
	ConfigFile  string
	GracePeriod time.Duration
}

func (*ServiceOptions) AddFlags

func (o *ServiceOptions) AddFlags(fs *flag.FlagSet)

func (*ServiceOptions) Validate

func (o *ServiceOptions) Validate() error

Jump to

Keyboard shortcuts

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