types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: UPL-1.0 Imports: 6 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
}

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"
)

func MapToPrincipalType

func MapToPrincipalType(authType string) (OCIPrincipalType, error)

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

Jump to

Keyboard shortcuts

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