Documentation ¶
Index ¶
- Constants
- Variables
- func NewCodeRepo(config *nautesconfigs.Config) (biz.CodeRepo, error)
- func NewData(logger log.Logger, _ *nautesconfigs.Config) (func(), error)
- func NewDexRepo(k8sClient client.Client) biz.DexRepo
- func NewGitRepo(config *nautesconfigs.Config) (biz.GitRepo, error)
- func NewGitlabClient(ctx context.Context, g *GitlabRepo) (gitlabclient.GitlabOperator, error)
- func NewHttpClient(ca string) (*http.Client, error)
- func NewHttpClientForVault(serverAddress, vaultCABundle string) (*kratoshttp.Client, error)
- func NewKubernetes() (biz.Kubernetes, error)
- func NewKubernetesAuth(config *nautesconfigs.Config) (*auth.KubernetesAuth, error)
- func NewSecretRepo(config *nautesconfigs.Config) (biz.Secretrepo, error)
- func NewVaultClient(config *nautesconfigs.Config) (biz.Secretrepo, error)
- func RemoveConfigURIs(configYAML string, redirectURIs string) (string, error)
- func UpdateConfigURIs(configYAML string, redirectURIs string) (string, error)
- type ConfigMap
- type Connectors
- type ConnectorsConfig
- type Dex
- type DexConfig
- type GitlabRepo
- func (g *GitlabRepo) CreateCodeRepo(ctx context.Context, gid int, options *biz.GitCodeRepoOptions) (*biz.Project, error)
- func (g *GitlabRepo) CreateGroup(ctx context.Context, git *biz.GitGroupOptions) (*biz.Group, error)
- func (g *GitlabRepo) CreateProjectAccessToken(ctx context.Context, pid interface{}, opt *biz.CreateProjectAccessTokenOptions) (*biz.ProjectAccessToken, error)
- func (g *GitlabRepo) DeleteCodeRepo(ctx context.Context, pid interface{}) error
- func (g *GitlabRepo) DeleteDeployKey(ctx context.Context, pid interface{}, deployKey int) error
- func (g *GitlabRepo) DeleteGroup(ctx context.Context, gid interface{}) error
- func (g *GitlabRepo) DeleteProjectAccessToken(ctx context.Context, pid interface{}, id int) error
- func (g *GitlabRepo) EnableProjectDeployKey(ctx context.Context, pid interface{}, deployKey int) (*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) GetCodeRepo(ctx context.Context, pid interface{}) (*biz.Project, error)
- func (g *GitlabRepo) GetCurrentUser(ctx context.Context) (user string, email string, err error)
- func (g *GitlabRepo) GetDeployKey(ctx context.Context, pid interface{}, deployKeyID int) (*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) GetGroup(ctx context.Context, gid interface{}) (*biz.Group, error)
- func (g *GitlabRepo) GetProjectAccessToken(ctx context.Context, pid interface{}, id int) (*biz.ProjectAccessToken, error)
- func (g *GitlabRepo) ListAccessTokens(ctx context.Context, pid interface{}, opt *biz.ListOptions) ([]*biz.ProjectAccessToken, error)
- func (g *GitlabRepo) ListAllDeployKeys(ctx context.Context, opt *biz.ListOptions) ([]*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) ListAllGroups(ctx context.Context) ([]*biz.Group, error)
- func (g *GitlabRepo) ListCodeRepos(ctx context.Context, search string) ([]*biz.Project, error)
- func (g *GitlabRepo) ListDeployKeys(ctx context.Context, pid interface{}, opt *biz.ListOptions) ([]*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) ListGroupCodeRepos(ctx context.Context, gid interface{}, opts *biz.ListGroupProjectsOptions) ([]*biz.Project, error)
- func (g *GitlabRepo) SaveDeployKey(ctx context.Context, pid interface{}, title string, canPush bool, ...) (*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) UpdateCodeRepo(ctx context.Context, pid interface{}, options *biz.GitCodeRepoOptions) (*biz.Project, error)
- func (g *GitlabRepo) UpdateDeployKey(ctx context.Context, pid interface{}, deployKey int, title string, ...) (*biz.ProjectDeployKey, error)
- func (g *GitlabRepo) UpdateGroup(ctx context.Context, gid interface{}, git *biz.GitGroupOptions) (*biz.Group, error)
- type Kubernetes
- type Oauth2
- type ProjectDeployKey
- type StaticClients
- type Storage
- type Web
Constants ¶
View Source
const (
ProductDir = "/tmp/product"
)
View Source
const (
Username = "default"
)
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewCodeRepo, NewSecretRepo, NewGitRepo, NewDexRepo, NewKubernetes)
ProviderSet is data providers.
Functions ¶
func NewCodeRepo ¶
func NewCodeRepo(config *nautesconfigs.Config) (biz.CodeRepo, error)
func NewGitRepo ¶
func NewGitRepo(config *nautesconfigs.Config) (biz.GitRepo, error)
func NewGitlabClient ¶
func NewGitlabClient(ctx context.Context, g *GitlabRepo) (gitlabclient.GitlabOperator, error)
func NewHttpClientForVault ¶
func NewHttpClientForVault(serverAddress, vaultCABundle string) (*kratoshttp.Client, error)
func NewKubernetes ¶
func NewKubernetes() (biz.Kubernetes, error)
func NewKubernetesAuth ¶
func NewKubernetesAuth(config *nautesconfigs.Config) (*auth.KubernetesAuth, error)
func NewSecretRepo ¶
func NewSecretRepo(config *nautesconfigs.Config) (biz.Secretrepo, error)
func NewVaultClient ¶
func NewVaultClient(config *nautesconfigs.Config) (biz.Secretrepo, error)
func RemoveConfigURIs ¶
Types ¶
type Connectors ¶ added in v0.4.1
type Connectors struct { Type string `yaml:"type"` ID string `yaml:"id"` Name string `yaml:"name"` Config ConnectorsConfig `yaml:"config"` }
type ConnectorsConfig ¶ added in v0.4.1
type Dex ¶
type Dex struct {
// contains filtered or unexported fields
}
func (*Dex) RemoveRedirectURIs ¶
func (*Dex) UpdateRedirectURIs ¶
type DexConfig ¶
type DexConfig struct { Issuer string `yaml:"issuer"` Storage Storage `yaml:"storage"` Web Web `yaml:"web"` Connectors []Connectors `yaml:"connectors"` Oauth2 Oauth2 `yaml:"oauth2"` StaticClients []StaticClients `yaml:"staticClients"` }
type GitlabRepo ¶ added in v0.4.1
type GitlabRepo struct {
// contains filtered or unexported fields
}
func NewGitlabRepo ¶
func NewGitlabRepo(url string, client gitlabclient.GitlabOperator) (*GitlabRepo, error)
func (*GitlabRepo) CreateCodeRepo ¶ added in v0.4.1
func (g *GitlabRepo) CreateCodeRepo(ctx context.Context, gid int, options *biz.GitCodeRepoOptions) (*biz.Project, error)
func (*GitlabRepo) CreateGroup ¶ added in v0.4.1
func (g *GitlabRepo) CreateGroup(ctx context.Context, git *biz.GitGroupOptions) (*biz.Group, error)
func (*GitlabRepo) CreateProjectAccessToken ¶ added in v0.4.1
func (g *GitlabRepo) CreateProjectAccessToken(ctx context.Context, pid interface{}, opt *biz.CreateProjectAccessTokenOptions) (*biz.ProjectAccessToken, error)
func (*GitlabRepo) DeleteCodeRepo ¶ added in v0.4.1
func (g *GitlabRepo) DeleteCodeRepo(ctx context.Context, pid interface{}) error
func (*GitlabRepo) DeleteDeployKey ¶ added in v0.4.1
func (g *GitlabRepo) DeleteDeployKey(ctx context.Context, pid interface{}, deployKey int) error
func (*GitlabRepo) DeleteGroup ¶ added in v0.4.1
func (g *GitlabRepo) DeleteGroup(ctx context.Context, gid interface{}) error
DeleteGroup Deletes group in gitlab
func (*GitlabRepo) DeleteProjectAccessToken ¶ added in v0.4.1
func (g *GitlabRepo) DeleteProjectAccessToken(ctx context.Context, pid interface{}, id int) error
func (*GitlabRepo) EnableProjectDeployKey ¶ added in v0.4.1
func (g *GitlabRepo) EnableProjectDeployKey(ctx context.Context, pid interface{}, deployKey int) (*biz.ProjectDeployKey, error)
func (*GitlabRepo) GetCodeRepo ¶ added in v0.4.1
func (*GitlabRepo) GetCurrentUser ¶ added in v0.4.1
func (*GitlabRepo) GetDeployKey ¶ added in v0.4.1
func (g *GitlabRepo) GetDeployKey(ctx context.Context, pid interface{}, deployKeyID int) (*biz.ProjectDeployKey, error)
func (*GitlabRepo) GetProjectAccessToken ¶ added in v0.4.1
func (g *GitlabRepo) GetProjectAccessToken(ctx context.Context, pid interface{}, id int) (*biz.ProjectAccessToken, error)
func (*GitlabRepo) ListAccessTokens ¶ added in v0.4.1
func (g *GitlabRepo) ListAccessTokens(ctx context.Context, pid interface{}, opt *biz.ListOptions) ([]*biz.ProjectAccessToken, error)
func (*GitlabRepo) ListAllDeployKeys ¶ added in v0.4.1
func (g *GitlabRepo) ListAllDeployKeys(ctx context.Context, opt *biz.ListOptions) ([]*biz.ProjectDeployKey, error)
func (*GitlabRepo) ListAllGroups ¶ added in v0.4.1
func (*GitlabRepo) ListCodeRepos ¶ added in v0.4.1
func (*GitlabRepo) ListDeployKeys ¶ added in v0.4.1
func (g *GitlabRepo) ListDeployKeys(ctx context.Context, pid interface{}, opt *biz.ListOptions) ([]*biz.ProjectDeployKey, error)
func (*GitlabRepo) ListGroupCodeRepos ¶ added in v0.4.1
func (g *GitlabRepo) ListGroupCodeRepos(ctx context.Context, gid interface{}, opts *biz.ListGroupProjectsOptions) ([]*biz.Project, error)
func (*GitlabRepo) SaveDeployKey ¶ added in v0.4.1
func (g *GitlabRepo) SaveDeployKey(ctx context.Context, pid interface{}, title string, canPush bool, publicKey []byte) (*biz.ProjectDeployKey, error)
func (*GitlabRepo) UpdateCodeRepo ¶ added in v0.4.1
func (g *GitlabRepo) UpdateCodeRepo(ctx context.Context, pid interface{}, options *biz.GitCodeRepoOptions) (*biz.Project, error)
func (*GitlabRepo) UpdateDeployKey ¶ added in v0.4.1
func (g *GitlabRepo) UpdateDeployKey(ctx context.Context, pid interface{}, deployKey int, title string, canPush bool) (*biz.ProjectDeployKey, error)
func (*GitlabRepo) UpdateGroup ¶ added in v0.4.1
func (g *GitlabRepo) UpdateGroup(ctx context.Context, gid interface{}, git *biz.GitGroupOptions) (*biz.Group, error)
type Kubernetes ¶
func (*Kubernetes) ListCodeRepo ¶
func (k *Kubernetes) ListCodeRepo(ctx context.Context) (*resourcev1alpha1.CodeRepoList, error)
func (*Kubernetes) ListCodeRepoBindings ¶
func (k *Kubernetes) ListCodeRepoBindings(ctx context.Context) (*resourcev1alpha1.CodeRepoBindingList, error)
type Oauth2 ¶ added in v0.4.1
type Oauth2 struct {
SkipApprovalScreen bool `yaml:"skipApprovalScreen"`
}
type ProjectDeployKey ¶
type ProjectDeployKey struct { }
type StaticClients ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.