vault

package
v1.0.1000 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Config

type Config struct {
	Address        string
	VariableSecret string
	Token          string
	SecretVariable bool
}

type ErrorResponse

type ErrorResponse struct {
	Errors   []string `json:"errors"`
	Warnings []string `json:"warnings"`
}

type MetaData

type MetaData struct {
	CreatedTime  time.Time `json:"created_time"`
	DeletionTime string    `json:"deletion_time"`
	Destroyed    bool      `json:"destroyed"`
}

type ResponseData

type ResponseData struct {
	Data struct {
		Data     map[string]string `json:"data"`
		Metadata struct {
			Destroyed bool `json:"destroyed"`
			Version   int  `json:"version"`
		} `json:"metadata"`
	} `json:"data"`
}

type ResponseLookUpToken

type ResponseLookUpToken struct {
	RequestId     string `json:"request_id"`
	LeaseId       string `json:"lease_id"`
	Renewable     bool   `json:"renewable"`
	LeaseDuration int    `json:"lease_duration"`
	Data          struct {
		Accessor       string    `json:"accessor"`
		CreationTime   int       `json:"creation_time"`
		CreationTtl    int       `json:"creation_ttl"`
		DisplayName    string    `json:"display_name"`
		EntityId       string    `json:"entity_id"`
		ExpireTime     time.Time `json:"expire_time"`
		ExplicitMaxTtl int       `json:"explicit_max_ttl"`
		Id             string    `json:"id"`
		IssueTime      time.Time `json:"issue_time"`
		NumUses        int       `json:"num_uses"`
		Orphan         bool      `json:"orphan"`
		Path           string    `json:"path"`
		Policies       []string  `json:"policies"`
		Renewable      bool      `json:"renewable"`
		Ttl            int       `json:"ttl"`
		Type           string    `json:"type"`
	} `json:"data"`
}

type ResponseMeta

type ResponseMeta struct {
	Data struct {
		CasRequired    bool                `json:"cas_required"`
		CurrentVersion int                 `json:"current_version"`
		MaxVersions    int                 `json:"max_versions"`
		OldestVersion  int                 `json:"oldest_version"`
		Versions       map[string]MetaData `json:"versions"`
	} `json:"data"`
}

type ResponseRenewToken

type ResponseRenewToken struct {
	RequestId     string `json:"request_id"`
	LeaseId       string `json:"lease_id"`
	Renewable     bool   `json:"renewable"`
	LeaseDuration int    `json:"lease_duration"`
}

type Vault

type Vault struct {
	VariableData map[string]string
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Vault) GetConfigData added in v0.0.9

func (c *Vault) GetConfigData(key string) (res []byte, err error)

func (*Vault) GetVariableData added in v0.0.9

func (c *Vault) GetVariableData(key string) string

func (*Vault) Init

func (c *Vault) Init() error

Jump to

Keyboard shortcuts

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