toi

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TypeTOIPackage               = "toiPackage"
	PackageSpecificationMimeType = "application/vnd.toi.ocm.software.package.v1+yaml"

	TypeYAML = resourcetypes.OCM_YAML

	AdditionalResourceConfigFile      = "configFile"
	AdditionalResourceCredentialsFile = "credentialsFile"
)
View Source
const (
	TypeTOIExecutor               = "toiExecutor"
	ExecutorSpecificationMimeType = "application/vnd.toi.ocm.software.executor.v1+yaml"
)

Variables

View Source
var ErrUndefined error = errors.New("nil reference")
View Source
var REALM = logging2.DefineSubRealm("TOI logging", "toi")

Functions

This section is empty.

Types

type AdditionalResource

type AdditionalResource struct {
	*metav1.ResourceReference `json:",inline"`
	Content                   json.RawMessage `json:"content,omitempty"`
}

type CredentialSpec

type CredentialSpec struct {
	// ConsumerId specifies the consumer id to look for the credentials
	ConsumerId credentials.ConsumerIdentity `json:"consumerId,omitempty"`
	// ConsumerType is the optional type used for matching the credentials
	ConsumerType string `json:"consumerType,omitempty"`
	// Reference refers to credentials store in some other repo
	Reference *cpi.GenericCredentialsSpec `json:"reference,omitempty"`
	// Credentials are direct credentials (one of Reference or Credentials must be set)
	Credentials common.Properties `json:"credentials,omitempty"`

	// TargetConsumerId specifies the consumer id to feed with these credentials
	TargetConsumerId credentials.ConsumerIdentity `json:"targetConsumerId,omitempty"`
}

type Credentials

type Credentials struct {
	Credentials map[string]CredentialSpec `json:"credentials,omitempty"`

	// Forwarded may define a list of consumer ids, which should be taken from the
	// local configuration and forwarded to the TOI executor in addition to the
	// credentials explicitly requested by the installation package.
	Forwarded []ForwardSpec `json:"forwardedConsumers,omitempty"`
}

type CredentialsRequest

type CredentialsRequest struct {
	Credentials map[string]CredentialsRequestSpec `json:"credentials,omitempty"`
}

type CredentialsRequestSpec

type CredentialsRequestSpec struct {
	// ConsumerId specified to consumer id the credentials are used for
	ConsumerId credentials.ConsumerIdentity `json:"consumerId,omitempty"`
	// Description described the usecase the credentials will be used for
	Description string `json:"description"`
	// Properties describes the meaning of the used properties for this
	// credential set.
	Properties common.Properties `json:"properties"`
	// Optional set to true make the request optional
	Optional bool `json:"optional,omitempty"`
}

func (*CredentialsRequestSpec) Match

type Executor

type Executor struct {
	Actions           []string                  `json:"actions,omitempty"`
	ResourceRef       *metav1.ResourceReference `json:"resourceRef,omitempty"`
	Image             *Image                    `json:"image,omitempty"`
	CredentialMapping map[string]string         `json:"credentialMapping,omitempty"`
	ParameterMapping  json.RawMessage           `json:"parameterMapping,omitempty"`
	Config            json.RawMessage           `json:"config,omitempty"`
	Outputs           map[string]string         `json:"outputs,omitempty"`
}

func (*Executor) Name

func (e *Executor) Name() string

type ExecutorSpecification

type ExecutorSpecification struct {
	CredentialsRequest `json:",inline"`
	Actions            []string                   `json:"actions,omitempty"`
	Image              *Image                     `json:"image,omitempty"`
	ImageRef           *metav1.ResourceReference  `json:"imageRef,omitempty"`
	Template           json.RawMessage            `json:"configTemplate,omitempty"`
	Libraries          []metav1.ResourceReference `json:"templateLibraries,omitempty"`
	Scheme             json.RawMessage            `json:"configScheme,omitempty"`
	Outputs            map[string]OutputSpec      `json:"outputs,omitempty"`
}

type ForwardSpec

type ForwardSpec struct {
	// ConsumerId specifies the consumer id to look for the credentials
	ConsumerId credentials.ConsumerIdentity `json:"consumerId"`
	// ConsumerType is the optional type used for matching the credentials
	ConsumerType string `json:"consumerType,omitempty"`
}

type Image

type Image struct {
	Ref    string `json:"ref"`
	Digest string `json:"digest"`
}

func (*Image) String

func (i *Image) String() string

type OutputSpec

type OutputSpec struct {
	Description string `json:"description,omitempty"`
}

type PackageSpecification

type PackageSpecification struct {
	CredentialsRequest  `json:",inline"`
	Template            json.RawMessage                `json:"configTemplate,omitempty"`
	Libraries           []metav1.ResourceReference     `json:"templateLibraries,omitempty"`
	Scheme              json.RawMessage                `json:"configScheme,omitempty"`
	Executors           []Executor                     `json:"executors"`
	Description         string                         `json:"description"`
	AdditionalResources map[string]*AdditionalResource `json:"additionalResources,omitempty"`
}

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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