environment

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Create(ctx context.Context, request *CreateEnvironmentRequest) (uint, error)
	UpdateByID(ctx context.Context, id uint, request *UpdateEnvironmentRequest) error
	ListEnvironments(ctx context.Context) (Environments, error)
	DeleteByID(ctx context.Context, id uint) error
	GetByID(ctx context.Context, id uint) (*Environment, error)
	GetByName(ctx context.Context, name string) (*Environment, error)
	// ListEnabledRegionsByEnvironment will be removed later. list regions by the environment that are enabled
	// Deprecated
	ListEnabledRegionsByEnvironment(ctx context.Context, environment string) (regionmodels.RegionParts, error)
}

func NewController

func NewController(param *param.Param) Controller

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

type Environment

type Environment struct {
	ID          uint      `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"displayName"`
	AutoFree    bool      `json:"autoFree"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type Environments

type Environments []*Environment

type UpdateEnvironmentRequest

type UpdateEnvironmentRequest struct {
	DisplayName string `json:"displayName"`
}

Jump to

Keyboard shortcuts

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