config

package
v0.14.9 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefreshTrue    = "true"
	RefreshWaitFor = "wait_for"
	RefreshFalse   = "false"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Enabled bool
	Basic   *BasicAuthConfig
	OIDC    *OIDCAuthConfig
}

type BasicAuthConfig

type BasicAuthConfig struct {
	Username string
	Password string
}

type Config

type Config struct {
	Auth          *AuthConfig
	Elasticsearch *ElasticsearchConfig
	Grafeas       *GrafeasConfig
	Opa           *OpaConfig
	Port          int
	Debug         bool
}

func Build

func Build(name string, args []string) (*Config, error)

type ElasticsearchConfig

type ElasticsearchConfig struct {
	Host     string
	Username string
	Password string
	Refresh  RefreshOption
}

func (ElasticsearchConfig) IsValid added in v0.2.1

func (c ElasticsearchConfig) IsValid() (e error)

type GrafeasConfig

type GrafeasConfig struct {
	Host string
}

type OIDCAuthConfig added in v0.14.0

type OIDCAuthConfig struct {
	Issuer                string
	RequiredAudience      string
	RoleClaimPath         string
	TlsInsecureSkipVerify bool
	Verifier              *oidc.IDTokenVerifier
}

type OpaConfig

type OpaConfig struct {
	Host string
}

type RefreshOption added in v0.2.1

type RefreshOption string

RefreshOption is based on https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html

func (RefreshOption) String added in v0.2.1

func (r RefreshOption) String() string

Jump to

Keyboard shortcuts

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