infisical

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithImports added in v0.21.0

func WithImports(rso *RetrieveSecretOptions)

Types

type InfisicalClient

type InfisicalClient struct {
	// contains filtered or unexported fields
}

func New

func New(host string, clientId string, clientSecret string) *InfisicalClient

func (*InfisicalClient) CheckToken

func (c *InfisicalClient) CheckToken() error

func (*InfisicalClient) GetSecret

func (c *InfisicalClient) GetSecret(name string, workspaceId string, environment string, optFuncs ...RetrieveSecretOptionFunc) (Secret, error)

func (*InfisicalClient) ListSecrets

func (c *InfisicalClient) ListSecrets(workspaceId string, environment string, optFuncs ...RetrieveSecretOptionFunc) ([]Secret, error)

func (*InfisicalClient) Login

func (c *InfisicalClient) Login() error

type LoginResponse

type LoginResponse struct {
	AccessToken       string `json:"accessToken"`
	ExpiresIn         int    `json:"expiresIn"`
	AccessTokenMaxTTL int    `json:"accessTokenMaxTTL"`
	TokenType         string `json:"tokenType"`
}

type RetrieveSecretOptionFunc added in v0.21.0

type RetrieveSecretOptionFunc func(*RetrieveSecretOptions)

func WithEnvironment added in v0.21.0

func WithEnvironment(environment string) RetrieveSecretOptionFunc

func WithSecretPath added in v0.21.0

func WithSecretPath(secretPath string) RetrieveSecretOptionFunc

func WithWorkspaceID added in v0.21.0

func WithWorkspaceID(workspaceId string) RetrieveSecretOptionFunc

type RetrieveSecretOptions

type RetrieveSecretOptions struct {
	WorkspaceID    string
	Environment    string
	SecretPath     string
	IncludeImports bool
}

func DefaultRetrieveSecretOptions

func DefaultRetrieveSecretOptions() *RetrieveSecretOptions

type Secret

type Secret struct {
	ID            string `json:"_id"`
	Environment   string `json:"environment,omitempty"`
	SecretComment string `json:"secretComment,omitempty"`
	SecretKey     string `json:"secretKey,omitempty"`
	SecretValue   string `json:"secretValue,omitempty"`
	Version       int    `json:"version,omitempty"`
	Workspace     string `json:"workspace,omitempty"`
}

type SecretResponse

type SecretResponse struct {
	Secret Secret `json:"secret"`
}

type SecretsResponse

type SecretsResponse struct {
	Secrets []Secret `json:"secrets"`
}

Jump to

Keyboard shortcuts

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