types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: UPL-1.0 Imports: 7 Imported by: 0

Documentation

Overview

** OCI Secrets Store CSI Driver Provider ** ** Copyright (c) 2022 Oracle America, Inc. and its affiliates. ** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Type                OCIPrincipalType
	Config              AuthConfig
	WorkloadIdentityCfg WorkloadIdentityConfig
}

type AuthConfig

type AuthConfig struct {
	Region      string `yaml:"region"`
	TenancyID   string `yaml:"tenancy"`
	UserID      string `yaml:"user"`
	PrivateKey  string `yaml:"privateKey"`
	Fingerprint string `yaml:"fingerprint"`
	Passphrase  string `yaml:"passphrase"`
}

func (*AuthConfig) Validate

func (config *AuthConfig) Validate() error

type AuthConfigYaml

type AuthConfigYaml struct {
	Auth map[string]string `yaml:"auth,omitempty"`
}

type ContentType

type ContentType int

ContentType is encoding type of secret content

const (
	Base64 ContentType = iota
)

func (*ContentType) String

func (contentType *ContentType) String() string

String returns string representation of ContentType

type OCIPrincipalType

type OCIPrincipalType string
const (
	Instance OCIPrincipalType = "instance"
	User     OCIPrincipalType = "user"
	Workload OCIPrincipalType = "workload"
)

func MapToPrincipalType

func MapToPrincipalType(authType string) (OCIPrincipalType, error)

type PodInfo added in v0.4.0

type PodInfo struct {
	Namespace          string
	Name               string
	UID                apiMachineryTypes.UID
	ServiceAccountName string
}

type SecretBundle

type SecretBundle struct {
	ID            string
	Name          string
	VersionNumber int64
	FileName      string
	Stages        []Stage
	BundleContent *SecretBundleContent
}

SecretBundle stores secrets itself and it's details

func (*SecretBundle) GetFilePath

func (request *SecretBundle) GetFilePath() string

type SecretBundleContent

type SecretBundleContent struct {
	ContentType ContentType
	Content     string
}

SecretBundleContent stores secrets content

func (*SecretBundleContent) Decode

func (content *SecretBundleContent) Decode() (string, error)

Decode decodes secret bundle content to plain text

type SecretBundleRequest

type SecretBundleRequest struct {
	Name          string        `yaml:"name"`
	Stage         Stage         `yaml:"stage,omitempty"`
	VersionNumber VersionNumber `yaml:"versionNumber,omitempty"`
	FileName      string        `yaml:"fileName,omitempty"`
}

SecretBundleRequest represents request for a single secret bundle. Bundle is identified by Name and either Stage or VersionNumber.

func (*SecretBundleRequest) GetFilePath

func (request *SecretBundleRequest) GetFilePath() string

func (*SecretBundleRequest) String

func (request *SecretBundleRequest) String() string

String returns string representation of SecretBundleRequest. Method is useful for secret bundle requests logging.

type SecretServiceRequest

type SecretServiceRequest struct {
	VaultID string
	Region  string
	Auth    Auth
	Secrets []SecretBundleRequest
}

type Stage

type Stage int

Stage represents secret's stage.

const (
	None Stage = iota // None means that stage is not defined
	Current
	Pending
	Latest
	Previous
	Deprecated
)

func (*Stage) FromString

func (stage *Stage) FromString(value string) error

func (*Stage) MarshalYAML

func (stage *Stage) MarshalYAML() (interface{}, error)

MarshalYAML customizes marshaling of Stage into a YAML document

func (*Stage) String

func (stage *Stage) String() string

String returns string representation of ContentType

func (*Stage) UnmarshalYAML

func (stage *Stage) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML customizes unmarshaling of YAML document into Stage

type VaultID

type VaultID string

type VersionNumber

type VersionNumber int64

func (*VersionNumber) UnmarshalYAML

func (versionNumber *VersionNumber) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML customizes unmarshaling of YAML document into VersionNumber

type WorkloadIdentityConfig added in v0.4.0

type WorkloadIdentityConfig struct {
	// Region  string
	SaToken []byte
}

Jump to

Keyboard shortcuts

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