data

package
v0.3.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Username              = "default"
	DefaultServiceAccount = "api-server-manager"
	CaPath                = "/opt/nautes/out/pki"
)

Variables

ProviderSet is data providers.

Functions

func GetToken

func GetToken(namespace string) (string, error)

func NewCodeRepo

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

func NewData

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

func NewDexRepo

func NewDexRepo(k8sClient client.Client) biz.DexRepo

func NewGitRepo

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

func NewGitlabClient

func NewGitlabClient(ctx context.Context, g *gitlabRepo) (gitlabclient.GitlabOperator, error)

func NewGitlabRepo

func NewGitlabRepo(url string, client gitlabclient.GitlabOperator) (*gitlabRepo, error)

func NewHttpClient

func NewHttpClient(ca string) (*http.Client, error)

func NewHttpClientForVault

func NewHttpClientForVault(serverAddress, vaultCABundle string) (*kratoshttp.Client, error)

func NewKubernetes added in v0.3.0

func NewKubernetes() (biz.Kubernetes, error)

func NewKubernetesAuth

func NewKubernetesAuth(mountPath string, roles map[string]string, namespace string) (*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 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 struct {
		Type string `yaml:"type"`
	} `yaml:"storage"`
	Web struct {
		HTTP string `yaml:"http"`
	} `yaml:"web"`
	Connectors []struct {
		Type   string `yaml:"type"`
		ID     string `yaml:"id"`
		Name   string `yaml:"name"`
		Config struct {
			BaseURL      string `yaml:"baseURL"`
			ClientID     string `yaml:"clientID"`
			ClientSecret string `yaml:"clientSecret"`
			RedirectURI  string `yaml:"redirectURI"`
		} `yaml:"config"`
	} `yaml:"connectors"`
	Oauth2 struct {
		SkipApprovalScreen bool `yaml:"skipApprovalScreen"`
	} `yaml:"oauth2"`
	StaticClients []struct {
		ID           string   `yaml:"id"`
		RedirectURIs []string `yaml:"redirectURIs"`
		Name         string   `yaml:"name"`
		Secret       string   `yaml:"secret"`
	} `yaml:"staticClients"`
}

type Kubernetes added in v0.3.0

type Kubernetes struct {
	Client client.Client
}

func (*Kubernetes) ListCodeRepo added in v0.3.0

func (k *Kubernetes) ListCodeRepo(ctx context.Context) (*resourcev1alpha1.CodeRepoList, error)

func (*Kubernetes) ListCodeRepoBindings added in v0.3.0

func (k *Kubernetes) ListCodeRepoBindings(ctx context.Context) (*resourcev1alpha1.CodeRepoBindingList, error)

type ProjectDeployKey

type ProjectDeployKey struct {
}

Jump to

Keyboard shortcuts

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