api

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSecretV3RawRequest

type CreateSecretV3RawRequest struct {
	SecretKey string `json:"-"`

	ProjectID             string `json:"workspaceId"`
	Environment           string `json:"environment"`
	SecretPath            string `json:"secretPath,omitempty"`
	Type                  string `json:"type,omitempty"`
	SecretComment         string `json:"secretComment,omitempty"`
	SkipMultiLineEncoding bool   `json:"skipMultilineEncoding"`
	SecretValue           string `json:"secretValue"`
}

Create secret

type CreateSecretV3RawResponse

type CreateSecretV3RawResponse struct {
	Secret models.Secret `json:"secret"`
}

func CallCreateSecretV3

func CallCreateSecretV3(httpClient *resty.Client, request CreateSecretV3RawRequest) (CreateSecretV3RawResponse, error)

type DeleteSecretV3RawRequest

type DeleteSecretV3RawRequest struct {
	SecretKey string `json:"-"`

	ProjectID   string `json:"workspaceId"`
	Environment string `json:"environment"`
	SecretPath  string `json:"secretPath,omitempty"`
	Type        string `json:"type,omitempty"`
}

Delete secret

type DeleteSecretV3RawResponse

type DeleteSecretV3RawResponse struct {
	Secret models.Secret `json:"secret"`
}

func CallDeleteSecretV3

func CallDeleteSecretV3(httpClient *resty.Client, request DeleteSecretV3RawRequest) (DeleteSecretV3RawResponse, error)

type ListSecretsV3RawRequest

type ListSecretsV3RawRequest struct {
	AttachToProcessEnv bool `json:"-"`

	// ProjectId and ProjectSlug are used to fetch secrets from the project. Only one of them is required.
	ProjectID              string `json:"workspaceId,omitempty"`
	ProjectSlug            string `json:"workspaceSlug,omitempty"`
	Environment            string `json:"environment"`
	ExpandSecretReferences bool   `json:"expandSecretReferences"`
	IncludeImports         bool   `json:"include_imports"`
	Recursive              bool   `json:"recursive"`
	SecretPath             string `json:"secretPath,omitempty"`
}

List secrets

type ListSecretsV3RawResponse

type ListSecretsV3RawResponse struct {
	Secrets []models.Secret       `json:"secrets"`
	Imports []models.SecretImport `json:"imports"`
}

func CallListSecretsV3

func CallListSecretsV3(cache *expirable.LRU[string, interface{}], httpClient *resty.Client, request ListSecretsV3RawRequest) (ListSecretsV3RawResponse, error)

type RetrieveSecretV3RawRequest

type RetrieveSecretV3RawRequest struct {
	SecretKey string `json:"secretKey"`

	ProjectID      string `json:"workspaceId"`
	Environment    string `json:"environment"`
	SecretPath     string `json:"secretPath,omitempty"`
	Type           string `json:"type,omitempty"`
	IncludeImports bool   `json:"include_imports"`
}

type RetrieveSecretV3RawResponse

type RetrieveSecretV3RawResponse struct {
	Secret models.Secret `json:"secret"`
}

func CallRetrieveSecretV3

func CallRetrieveSecretV3(cache *expirable.LRU[string, interface{}], httpClient *resty.Client, request RetrieveSecretV3RawRequest) (RetrieveSecretV3RawResponse, error)

type UpdateSecretV3RawRequest

type UpdateSecretV3RawRequest struct {
	SecretKey string `json:"-"`

	ProjectID   string `json:"workspaceId"`
	Environment string `json:"environment"`
	SecretPath  string `json:"secretPath,omitempty"`
	Type        string `json:"type,omitempty"`

	NewSecretValue           string `json:"secretValue,omitempty"`
	NewSkipMultilineEncoding bool   `json:"skipMultilineEncoding,omitempty"`
}

Update secret

type UpdateSecretV3RawResponse

type UpdateSecretV3RawResponse struct {
	Secret models.Secret `json:"secret"`
}

func CallUpdateSecretV3

func CallUpdateSecretV3(httpClient *resty.Client, request UpdateSecretV3RawRequest) (UpdateSecretV3RawResponse, error)

Jump to

Keyboard shortcuts

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