infisical

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 22 Imported by: 37

README

infisical

Infisical Go SDK

Slack | Infisical Cloud | Self-Hosting | SDK Docs | Website

Infisical is released under the MIT license. PRs welcome! git commit activity Slack community channel Infisical Twitter

Introduction

Infisical is the open source secret management platform that teams use to centralize their secrets like API keys, database credentials, and configurations.

The Infisical Go SDK provides a robust and efficient way for Go developers to integrate Infisical's secret management capabilities into their applications. With our SDK, you can seamlessly retrieve, update, delete, and manage your application's secrets. The SDK offers a simple API, making it easy to integrate Infisical's core features into your Go projects with minimal effort. Whether you are building microservices, cloud-native applications, or any other Go-based systems.

For detailed documentation on how to get started with the Infisical Go SDK, check out our SDK Docs.

Security

Please do not file GitHub issues or post on our public forum for security vulnerabilities, as they are public!

Infisical takes security issues very seriously. If you have any concerns about Infisical or believe you have uncovered a vulnerability, please get in touch via the e-mail address security@infisical.com. In the message, try to provide a description of the issue and ideally a way of reproducing it. The security team will get back to you as soon as possible.

Note that this security address should be used only for undisclosed vulnerabilities. Please report any security problems to us before disclosing it publicly.

Contributing

Whether it's big or small, we love contributions. Check out our guide to see how to get started.

Not sure where to get started? Join our Slack, and ask us any questions there.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError added in v0.1.7

type APIError = errors.APIError

type Auth

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

func (*Auth) AwsIamAuthLogin

func (a *Auth) AwsIamAuthLogin(identityId string) (credential MachineIdentityCredential, err error)

func (*Auth) AzureAuthLogin

func (a *Auth) AzureAuthLogin(identityID string, resource string) (credential MachineIdentityCredential, err error)

func (*Auth) GcpIamAuthLogin

func (a *Auth) GcpIamAuthLogin(identityID string, serviceAccountKeyFilePath string) (credential MachineIdentityCredential, err error)

func (*Auth) GcpIdTokenAuthLogin

func (a *Auth) GcpIdTokenAuthLogin(identityID string) (credential MachineIdentityCredential, err error)

func (*Auth) KubernetesAuthLogin

func (a *Auth) KubernetesAuthLogin(identityID string, serviceAccountTokenPath string) (credential MachineIdentityCredential, err error)

func (*Auth) KubernetesRawServiceAccountTokenLogin added in v0.1.8

func (a *Auth) KubernetesRawServiceAccountTokenLogin(identityID string, serviceAccountToken string) (credential MachineIdentityCredential, err error)

func (*Auth) OidcAuthLogin added in v0.3.0

func (a *Auth) OidcAuthLogin(identityId string, jwt string) (credential MachineIdentityCredential, err error)

func (*Auth) SetAccessToken

func (a *Auth) SetAccessToken(accessToken string)

func (*Auth) UniversalAuthLogin

func (a *Auth) UniversalAuthLogin(clientID string, clientSecret string) (credential MachineIdentityCredential, err error)

type AuthInterface

type AuthInterface interface {
	SetAccessToken(accessToken string)
	UniversalAuthLogin(clientID string, clientSecret string) (credential MachineIdentityCredential, err error)
	KubernetesAuthLogin(identityID string, serviceAccountTokenPath string) (credential MachineIdentityCredential, err error)
	KubernetesRawServiceAccountTokenLogin(identityID string, serviceAccountToken string) (credential MachineIdentityCredential, err error)
	AzureAuthLogin(identityID string, resource string) (credential MachineIdentityCredential, err error)
	GcpIdTokenAuthLogin(identityID string) (credential MachineIdentityCredential, err error)
	GcpIamAuthLogin(identityID string, serviceAccountKeyFilePath string) (credential MachineIdentityCredential, err error)
	AwsIamAuthLogin(identityId string) (credential MachineIdentityCredential, err error)
	OidcAuthLogin(identityId string, jwt string) (credential MachineIdentityCredential, err error)
}

func NewAuth

func NewAuth(client *InfisicalClient) AuthInterface

type Config

type Config struct {
	SiteUrl          string `default:"https://app.infisical.com"`
	UserAgent        string `default:"infisical-go-sdk"` // User-Agent header to be used on requests sent by the SDK. Defaults to `infisical-go-sdk`. Do not modify this unless you have a reason to do so.
	AutoTokenRefresh bool   `default:"true"`             // Wether or not to automatically refresh the auth token after using one of the .Auth() methods. Defaults to `true`.
	SilentMode       bool   `default:"false"`            // If enabled, the SDK will not print any warnings to the console.
}

type CreateDynamicSecretLeaseOptions added in v0.3.9

type CreateDynamicSecretLeaseOptions = api.CreateDynamicSecretLeaseV1Request

type CreateFolderOptions added in v0.1.6

type CreateFolderOptions = api.CreateFolderV1Request

type CreateSecretOptions

type CreateSecretOptions = api.CreateSecretV3RawRequest

type DeleteDynamicSecretLeaseOptions added in v0.3.9

type DeleteDynamicSecretLeaseOptions = api.DeleteDynamicSecretLeaseV1Request

type DeleteFolderOptions added in v0.1.6

type DeleteFolderOptions = api.DeleteFolderV1Request

type DeleteSecretOptions

type DeleteSecretOptions = api.DeleteSecretV3RawRequest

type DynamicSecretLeases added in v0.3.9

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

func (*DynamicSecretLeases) Create added in v0.3.9

func (*DynamicSecretLeases) DeleteById added in v0.3.9

func (*DynamicSecretLeases) GetById added in v0.3.9

func (*DynamicSecretLeases) List added in v0.3.9

func (*DynamicSecretLeases) RenewById added in v0.3.9

type DynamicSecrets added in v0.3.9

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

func (*DynamicSecrets) GetByName added in v0.3.9

func (*DynamicSecrets) Leases added in v0.3.9

func (*DynamicSecrets) List added in v0.3.9

type DynamicSecretsInterface added in v0.3.9

func NewDynamicSecrets added in v0.3.9

func NewDynamicSecrets(client *InfisicalClient) DynamicSecretsInterface

type Folders added in v0.1.6

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

func (*Folders) Create added in v0.1.6

func (f *Folders) Create(options CreateFolderOptions) (models.Folder, error)

func (*Folders) Delete added in v0.1.6

func (f *Folders) Delete(options DeleteFolderOptions) (models.Folder, error)

func (*Folders) List added in v0.1.6

func (f *Folders) List(options ListFoldersOptions) ([]models.Folder, error)

func (*Folders) Update added in v0.1.6

func (f *Folders) Update(options UpdateFolderOptions) (models.Folder, error)

type FoldersInterface added in v0.1.6

type FoldersInterface interface {
	List(options ListFoldersOptions) ([]models.Folder, error)
	Update(options UpdateFolderOptions) (models.Folder, error)
	Create(options CreateFolderOptions) (models.Folder, error)
	Delete(options DeleteFolderOptions) (models.Folder, error)
}

func NewFolders added in v0.1.6

func NewFolders(client *InfisicalClient) FoldersInterface

type GetDynamicSecretLeaseByIdOptions added in v0.3.9

type GetDynamicSecretLeaseByIdOptions = api.GetDynamicSecretLeaseByIdV1Request

type GetDynamicSecretRootCredentialByNameOptions added in v0.3.9

type GetDynamicSecretRootCredentialByNameOptions = api.GetDynamicSecretByNameV1Request

type InfisicalClient

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

func (*InfisicalClient) Auth

func (c *InfisicalClient) Auth() AuthInterface

func (*InfisicalClient) DynamicSecrets added in v0.3.9

func (c *InfisicalClient) DynamicSecrets() DynamicSecretsInterface

func (*InfisicalClient) Folders added in v0.1.6

func (c *InfisicalClient) Folders() FoldersInterface

func (*InfisicalClient) Secrets

func (c *InfisicalClient) Secrets() SecretsInterface

func (*InfisicalClient) UpdateConfiguration

func (c *InfisicalClient) UpdateConfiguration(config Config)

type InfisicalClientInterface

type InfisicalClientInterface interface {
	UpdateConfiguration(config Config)
	Secrets() SecretsInterface
	Folders() FoldersInterface
	Auth() AuthInterface
	DynamicSecrets() DynamicSecretsInterface
}

func NewInfisicalClient

func NewInfisicalClient(context context.Context, config Config) InfisicalClientInterface

type KubernetesAuthLoginOptions

type KubernetesAuthLoginOptions struct {
	IdentityID              string
	ServiceAccountTokenPath string
}

type ListDynamicSecretLeasesOptions added in v0.3.9

type ListDynamicSecretLeasesOptions = api.ListDynamicSecretLeaseV1Request

type ListDynamicSecretsRootCredentialsOptions added in v0.3.9

type ListDynamicSecretsRootCredentialsOptions = api.ListDynamicSecretsV1Request

type ListFoldersOptions added in v0.1.6

type ListFoldersOptions = api.ListFoldersV1Request

type ListSecretsOptions

type ListSecretsOptions = api.ListSecretsV3RawRequest

type MachineIdentityCredential added in v0.2.0

type MachineIdentityCredential = api.MachineIdentityAuthLoginResponse

type RenewDynamicSecretLeaseOptions added in v0.3.9

type RenewDynamicSecretLeaseOptions = api.RenewDynamicSecretLeaseV1Request

type RequestError added in v0.1.7

type RequestError = errors.RequestError

type RetrieveSecretOptions

type RetrieveSecretOptions = api.RetrieveSecretV3RawRequest

type Secret

type Secret = models.Secret

type SecretImport

type SecretImport = models.SecretImport

type Secrets

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

func (*Secrets) Create

func (s *Secrets) Create(options CreateSecretOptions) (models.Secret, error)

func (*Secrets) Delete

func (s *Secrets) Delete(options DeleteSecretOptions) (models.Secret, error)

func (*Secrets) List

func (s *Secrets) List(options ListSecretsOptions) ([]models.Secret, error)

func (*Secrets) Retrieve

func (s *Secrets) Retrieve(options RetrieveSecretOptions) (models.Secret, error)

func (*Secrets) Update

func (s *Secrets) Update(options UpdateSecretOptions) (models.Secret, error)

type SecretsInterface

type SecretsInterface interface {
	List(options ListSecretsOptions) ([]models.Secret, error)
	Retrieve(options RetrieveSecretOptions) (models.Secret, error)
	Update(options UpdateSecretOptions) (models.Secret, error)
	Create(options CreateSecretOptions) (models.Secret, error)
	Delete(options DeleteSecretOptions) (models.Secret, error)
}

func NewSecrets

func NewSecrets(client *InfisicalClient) SecretsInterface

type UpdateFolderOptions added in v0.1.6

type UpdateFolderOptions = api.UpdateFolderV1Request

type UpdateSecretOptions

type UpdateSecretOptions = api.UpdateSecretV3RawRequest

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

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