secret_provider

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationData

type AuthenticationData struct {
	Token    string `json:"token"`
	Username string `json:"username"`
	Passwd   string `json:"passwd"`
}

type AuthenticationEntity

type AuthenticationEntity struct {
	Identity           Identity           `json:"identity"`
	AuthenticationType AuthenticationType `json:"authentication_type"`
	AuthenticationData AuthenticationData `json:"authentication_data"`
}

type AuthenticationType

type AuthenticationType string
const (
	TokenType     AuthenticationType = "token"
	BasicAuthType AuthenticationType = "basic-auth"
)

type Identity

type Identity struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

type SecretProvider

type SecretProvider struct {
	AuthenticationEntities      []AuthenticationEntity
	AuthenticationEntityMapping map[AuthenticationType]map[Identity]AuthenticationEntity
}

func NewSecretProvider

func NewSecretProvider(filePath string) (*SecretProvider, error)

func (*SecretProvider) GetApplicationBasicAuth

func (o *SecretProvider) GetApplicationBasicAuth(Identity Identity) (username, passwd string, err error)

func (*SecretProvider) GetApplicationToken

func (o *SecretProvider) GetApplicationToken(Identity Identity) (token string, err error)

Jump to

Keyboard shortcuts

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