data

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductDir = "/tmp/product"
)
View Source
const (
	Username = "default"
)

Variables

ProviderSet is data providers.

Functions

func NewCodeRepo

func NewCodeRepo(config *nautesconfigs.Config) (biz.CodeRepo, error)

func NewData

func NewData(logger log.Logger, _ *nautesconfigs.Config) (func(), error)

func NewDexRepo

func NewDexRepo(k8sClient client.Client) biz.DexRepo

func NewGitRepo

func NewGitRepo(config *nautesconfigs.Config) (biz.GitRepo, error)

func NewHttpClient

func NewHttpClient(ca string) (*http.Client, 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

func RemoveConfigURIs(configYAML string, redirectURIs string) (string, error)

func UpdateConfigURIs

func UpdateConfigURIs(configYAML string, redirectURIs string) (string, error)

Types

type ConfigMap

type ConfigMap struct {
	Data map[string]string `yaml:"data"`
}

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 ConnectorsConfig struct {
	BaseURL      string `yaml:"baseURL"`
	ClientID     string `yaml:"clientID"`
	ClientSecret string `yaml:"clientSecret"`
	RedirectURI  string `yaml:"redirectURI"`
}

type Dex

type Dex struct {
	// contains filtered or unexported fields
}

func (*Dex) GetDexConfig

func (d *Dex) GetDexConfig() (*corev1.ConfigMap, error)

func (*Dex) RemoveRedirectURIs

func (d *Dex) RemoveRedirectURIs(url string) error

func (*Dex) UpdateRedirectURIs

func (d *Dex) UpdateRedirectURIs(url string) error

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 (g *GitlabRepo) GetCodeRepo(ctx context.Context, pid interface{}) (*biz.Project, error)

func (*GitlabRepo) GetCurrentUser added in v0.4.1

func (g *GitlabRepo) GetCurrentUser(ctx context.Context) (user string, email string, err error)

func (*GitlabRepo) GetDeployKey added in v0.4.1

func (g *GitlabRepo) GetDeployKey(ctx context.Context, pid interface{}, deployKeyID int) (*biz.ProjectDeployKey, error)

func (*GitlabRepo) GetGroup added in v0.4.1

func (g *GitlabRepo) GetGroup(ctx context.Context, gid interface{}) (*biz.Group, 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 (g *GitlabRepo) ListAllGroups(ctx context.Context) ([]*biz.Group, error)

func (*GitlabRepo) ListCodeRepos added in v0.4.1

func (g *GitlabRepo) ListCodeRepos(ctx context.Context, search string) ([]*biz.Project, error)

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

type Kubernetes struct {
	Client client.Client
}

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

type StaticClients struct {
	ID           string   `yaml:"id"`
	RedirectURIs []string `yaml:"redirectURIs"`
	Name         string   `yaml:"name"`
	Secret       string   `yaml:"secret"`
}

type Storage added in v0.4.1

type Storage struct {
	Type string `yaml:"type"`
}

type Web added in v0.4.1

type Web struct {
	HTTP string `yaml:"http"`
}

Jump to

Keyboard shortcuts

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