environments

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetService added in v1.1.7

func SetService(svc Service)

Types

type CreateOptions added in v1.1.7

type CreateOptions struct {
	Name      string `json:"name"`
	ProjectID string `json:"project_id"`
	UserID    string `json:"user_id"`
}

type DefaultService added in v1.1.7

type DefaultService struct{}

func (*DefaultService) Create added in v1.1.7

Create a new environment

func (*DefaultService) CreateWithUserID added in v1.1.7

func (*DefaultService) CreateWithUserID(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) (*Environment, error)

func (*DefaultService) Delete added in v1.1.7

Delete a environment by ID

func (*DefaultService) Get added in v1.1.7

Get a environment by ID

func (*DefaultService) GetByNameAndProjectID added in v1.1.7

func (*DefaultService) GetByNameAndProjectID(ctx context.ServiceContext, client *clients.GQLClient, name, project_id string) (*Environment, error)

Get a environment by ID

func (*DefaultService) List added in v1.1.7

func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) (*[]Environment, error)

List environments

func (*DefaultService) Sync added in v1.1.7

func (*DefaultService) Sync(ctx context.ServiceContext, client *clients.GQLClient, options *SyncOptions) error

This function syncs the secrets of an environment with it's connected integrations. This function assumed that the secrets being supplied are already decrypted.

func (*DefaultService) Update added in v1.1.7

Update a environment by ID

type Environment added in v1.1.7

type Environment struct {
	ID        string    `json:"id,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	Name      string    `json:"name,omitempty"`
	ProjectID string    `json:"project_id,omitempty"`
	UserID    string    `json:"user_id"`
}

type ListOptions added in v1.1.7

type ListOptions struct {
	ProjectID string `json:"project_id"`
}

type SyncOptions added in v1.1.7

type SyncOptions struct {
	EnvID           string
	IntegrationType integrations.Type
	Secrets         *keypayload.KPMap
}

type SyncRequestOptions added in v1.1.7

type SyncRequestOptions struct {
	IntegrationType integrations.Type `json:"integration_type,omitempty"`
	Data            *keypayload.KPMap `json:"data"`
}

type SyncWithPasswordRequestOptions added in v1.1.7

type SyncWithPasswordRequestOptions struct {
	IntegrationType integrations.Type `json:"integration_type,omitempty"`
	Password        string            `json:"password" validate:"required"`
	Version         *int              `json:"version,omitempty"`

	// Name of the secret to sync.
	Key string `json:"key,omitempty"`
}

type UpdateOptions added in v1.1.7

type UpdateOptions struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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