controller

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

README

This directory contains code for the registry controller command. This is currently in experimental stage.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateApiHandler

func GenerateApiHandler(result *[]Resource) func(*rpc.Api)

func GenerateArtifactHandler

func GenerateArtifactHandler(result *[]Resource) func(*rpc.Artifact)

func GenerateSpecHandler

func GenerateSpecHandler(result *[]Resource) func(*rpc.ApiSpec)

func ValidateResourceEntry added in v0.3.1

func ValidateResourceEntry(resource *rpc.GeneratedResource) error

Types

type Action added in v0.3.1

type Action struct {
	Command           string
	GeneratedResource string
	RequiresReceipt   bool
}

func ProcessManifest

func ProcessManifest(
	ctx context.Context,
	client connection.Client,
	projectID string,
	manifest *rpc.Manifest) []*Action

type ApiResource

type ApiResource struct {
	Api *rpc.Api
}

func (ApiResource) ExtractResourceGroup

func (a ApiResource) ExtractResourceGroup(group_id string) string

func (ApiResource) GetApi

func (a ApiResource) GetApi() string

func (ApiResource) GetArtifact

func (a ApiResource) GetArtifact() string

func (ApiResource) GetName

func (a ApiResource) GetName() string

func (ApiResource) GetSpec

func (a ApiResource) GetSpec() string

func (ApiResource) GetUpdateTimestamp

func (a ApiResource) GetUpdateTimestamp() time.Time

func (ApiResource) GetVersion

func (a ApiResource) GetVersion() string

type ArtifactResource

type ArtifactResource struct {
	Artifact *rpc.Artifact
}

func (ArtifactResource) ExtractResourceGroup

func (ar ArtifactResource) ExtractResourceGroup(group_id string) string

func (ArtifactResource) GetApi

func (ar ArtifactResource) GetApi() string

func (ArtifactResource) GetArtifact

func (ar ArtifactResource) GetArtifact() string

func (ArtifactResource) GetName

func (ar ArtifactResource) GetName() string

func (ArtifactResource) GetSpec

func (ar ArtifactResource) GetSpec() string

func (ArtifactResource) GetUpdateTimestamp

func (ar ArtifactResource) GetUpdateTimestamp() time.Time

func (ArtifactResource) GetVersion

func (ar ArtifactResource) GetVersion() string

type ExecCommandTask

type ExecCommandTask struct {
	Action *Action
	TaskID string
}

func (*ExecCommandTask) Run

func (task *ExecCommandTask) Run(ctx context.Context) error

func (*ExecCommandTask) String

func (task *ExecCommandTask) String() string

type Resource

type Resource interface {
	GetArtifact() string
	GetSpec() string
	GetVersion() string
	GetApi() string
	GetName() string
	GetUpdateTimestamp() time.Time
	ExtractResourceGroup(string) string
}

func ListResources

func ListResources(ctx context.Context, client connection.Client, pattern, filter string) ([]Resource, error)

type SpecResource

type SpecResource struct {
	Spec *rpc.ApiSpec
}

func (SpecResource) ExtractResourceGroup

func (s SpecResource) ExtractResourceGroup(group_id string) string

func (SpecResource) GetApi

func (s SpecResource) GetApi() string

func (SpecResource) GetArtifact

func (s SpecResource) GetArtifact() string

func (SpecResource) GetName

func (s SpecResource) GetName() string

func (SpecResource) GetSpec

func (s SpecResource) GetSpec() string

func (SpecResource) GetUpdateTimestamp

func (s SpecResource) GetUpdateTimestamp() time.Time

func (SpecResource) GetVersion

func (s SpecResource) GetVersion() string

Jump to

Keyboard shortcuts

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