infisical

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithImports

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

type RetrieveSecretOptionFunc func(*RetrieveSecretOptions)

func WithEnvironment

func WithEnvironment(environment string) RetrieveSecretOptionFunc

func WithSecretPath

func WithSecretPath(secretPath string) RetrieveSecretOptionFunc

func WithWorkspaceID

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