v1beta1

package
v0.0.0-...-337c05f Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package v1beta1 provides the Bottle types used ACE Data Bottles

Index

Constants

View Source
const AnnotationDeprecates = "bottle.data.act3-ace.io/deprecates"

AnnotationDeprecates is the key for the deprecation annotation. The value is a comma separated list of bottle IDs (digests)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "data.act3-ace.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addKnownConversions)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Convert_v1alpha2_Bottle_To_v1beta1_Bottle

func Convert_v1alpha2_Bottle_To_v1beta1_Bottle(in *v1alpha2.Bottle, out *Bottle, scope conversion.Scope) error

Convert_v1alpha2_Bottle_To_v1beta1_Bottle converts Bottle from v1alpha2 to v1beta1

func Convert_v1alpha3_Bottle_To_v1beta1_Bottle

func Convert_v1alpha3_Bottle_To_v1beta1_Bottle(in *v1alpha3.Bottle, out *Bottle, scope conversion.Scope) error

Convert_v1alpha3_Bottle_To_v1beta1_Bottle converts Bottle from v1alpha3 to v1beta1

func Convert_v1alpha4_Bottle_To_v1beta1_Bottle

func Convert_v1alpha4_Bottle_To_v1beta1_Bottle(in *v1alpha4.Bottle, out *Bottle, scope conversion.Scope) error

Convert_v1alpha4_Bottle_To_v1beta1_Bottle converts Bottle from v1alpha4 to v1beta1

func Convert_v1alpha5_Bottle_To_v1beta1_Bottle

func Convert_v1alpha5_Bottle_To_v1beta1_Bottle(in *v1alpha5.Bottle, out *Bottle, scope conversion.Scope) error

Convert_v1alpha5_Bottle_To_v1beta1_Bottle converts Bottle from v1alpha5 to v1beta1

func ValidateMetrics

func ValidateMetrics(metrics []Metric) error

ValidateMetrics ensures that the metrics names are unique

func ValidateParts

func ValidateParts(parts []Part) error

ValidateParts ensures that the part name is unique and that no part is a prefix of any other part

func ValidatePublicArtifacts

func ValidatePublicArtifacts(b Bottle) error

ValidatePublicArtifacts validates public artifacts path is unique and that each artifact belongs to a single part

Types

type Author

type Author struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
	URL   string `json:"url,omitempty"`
}

Author is a collection of information about a author, including name, email, and a URL link

func (*Author) DeepCopy

func (in *Author) DeepCopy() *Author

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Author.

func (*Author) DeepCopyInto

func (in *Author) DeepCopyInto(out *Author)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Author) Validate

func (a Author) Validate() error

Validate Author using ozzo-validation

type Bottle

type Bottle struct {
	metav1.TypeMeta `json:",inline"`

	Labels          map[string]string `json:"labels,omitempty"`
	Annotations     map[string]string `json:"annotations,omitempty"`
	Description     string            `json:"description,omitempty"`
	Sources         []Source          `json:"sources,omitempty"`
	Authors         []Author          `json:"authors,omitempty"`
	Metrics         []Metric          `json:"metrics,omitempty"`
	PublicArtifacts []PublicArtifact  `json:"publicArtifacts,omitempty"`
	Parts           []Part            `json:"parts,omitempty"`
}

Bottle represents the overall structure of a data set entry.json or entry.yaml

func NewBottle

func NewBottle() Bottle

NewBottle returns a definition containing data initialized to default values.

func (*Bottle) DeepCopy

func (in *Bottle) DeepCopy() *Bottle

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bottle.

func (*Bottle) DeepCopyInto

func (in *Bottle) DeepCopyInto(out *Bottle)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Bottle) DeepCopyObject

func (in *Bottle) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Bottle) ToDocumentedYAML

func (b Bottle) ToDocumentedYAML() ([]byte, error)

ToDocumentedYAML converts the bottle into YAML with comments explaining each field. It omits the parts field.

func (Bottle) Validate

func (b Bottle) Validate() error

Validate Bottle using ozzo-validation. Returns a list of errors

type Metric

type Metric struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Value       string `json:"value,omitempty"`
}

Metric is a collection of data about an experiment. Used to document results in metadata

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Metric) Validate

func (m Metric) Validate() error

Validate Metric using ozzo-validation

type Part

type Part struct {
	Name   string            `json:"name,omitempty"`
	Size   int64             `json:"size,omitempty"`
	Digest digest.Digest     `json:"digest,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
}

Part represents the layout of individual file records in a bottle metadata json file

func (*Part) DeepCopy

func (in *Part) DeepCopy() *Part

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Part.

func (*Part) DeepCopyInto

func (in *Part) DeepCopyInto(out *Part)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Part) Validate

func (p Part) Validate() error

Validate Part using ozzo-validation and k8s label validation

type PublicArtifact

type PublicArtifact struct {
	Name      string        `json:"name,omitempty"`
	Path      string        `json:"path,omitempty"`
	MediaType string        `json:"mediaType,omitempty" yaml:"mediaType"` // yaml tag is needed because encoded field name (mediaType) has a capital letter.  This is needed for the HACK ToYamlNodes() to function properly.
	Digest    digest.Digest `json:"digest,omitempty"`
}

PublicArtifact is a collection of information about files included in the bottle that should be treated specially. There can be multiple entries, each with a type, and referring to a file in the bottle by path. The path provided can be within a directory that is archived (and thus does not correspond to a bottle part directly) These files will be exposed to the telemetry server/catalog explicitly, thus should not contain sensitive information

func (*PublicArtifact) DeepCopy

func (in *PublicArtifact) DeepCopy() *PublicArtifact

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicArtifact.

func (*PublicArtifact) DeepCopyInto

func (in *PublicArtifact) DeepCopyInto(out *PublicArtifact)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PublicArtifact) Validate

func (a PublicArtifact) Validate() error

Validate PublicArtifact using ozzo-validation

type Source

type Source struct {
	Name string `json:"name,omitempty"`
	URI  string `json:"uri,omitempty"`
}

Source is a definition of a data source, containing a name and a url

func (*Source) DeepCopy

func (in *Source) DeepCopy() *Source

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source.

func (*Source) DeepCopyInto

func (in *Source) DeepCopyInto(out *Source)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Source) Validate

func (s Source) Validate() error

Validate Source using ozzo-validation

Jump to

Keyboard shortcuts

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