manager

package
v0.0.0-...-faef39e Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	License(ctx context.Context, req LicenseRequest) (LicenseResponse, error)

	Registry(ctx context.Context) (RegistryResponse, error)
}

func NewClient

func NewClient(endpoint, id, key string, mods ...util.Mod[goHttp.Transport]) (Client, error)

func NewClientFromConn

func NewClientFromConn(conn driver.Connection) Client

type LicenseRequest

type LicenseRequest struct {
	DeploymentID *string                        `json:"deployment_id,omitempty"`
	TTL          *time.Duration                 `json:"ttl,omitempty"`
	Inventory    *ugrpc.Object[*inventory.Spec] `json:"inventory,omitempty"`
}

type LicenseResponse

type LicenseResponse struct {
	ID      string `json:"id"`
	License string `json:"license"`
}

type Registry

type Registry struct {
	Auths map[string]RegistryAuth `json:"auths,omitempty"`
}

func NewRegistryAuth

func NewRegistryAuth(endpoint, username, password string, stages ...Stage) (*Registry, error)

type RegistryAuth

type RegistryAuth struct {
	Client string `json:"client"`
	Auth   string `json:"auth,omitempty"`
}

type RegistryResponse

type RegistryResponse struct {
	Token string `json:"token"`
}

type Stage

type Stage int
const (
	StageUnknown Stage = iota
	StageDev
	StageQA
	StagePrd
)

func ParseStage

func ParseStage(s string) Stage

func ParseStages

func ParseStages(s ...string) []Stage

func (Stage) RegistryDomain

func (s Stage) RegistryDomain(domain string) (string, error)

Jump to

Keyboard shortcuts

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