v1alpha1

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 stores definitions and methods to handle storage definitions and methods +kubebuilder:object:generate=true +k8s:deepcopy-gen=package +groupName=storage.pkg.katanomi.dev

Index

Constants

View Source
const (
	// FileContentTypeJunitXML for junit xml file
	FileContentTypeJunitXML = "application/vnd.katanomi.junit+xml"
	// FileContentTypeAllureSite for allure site files
	FileContentTypeAllureSite = "application/vnd.katanomi.allure+site"
	// FileContentTypeGoJson for go json file
	FileContentTypeGoJson = "application/vnd.katanomi.gojson+json"
	// FileContentTypeJacocoSite for jacoco site files
	FileContentTypeJacocoSite = "application/vnd.katanomi.jacoco+site"
	// FileContentTypeGolangCoverageTxt for golang coverage text file
	FileContentTypeGolangCoverageTxt = "application/vnd.katanomi.golang-coverage+txt"
)
View Source
const FileTypeAnnotation = "storage.katanomi.dev/fileType"

FileTypeAnnotation for recording business file type of file object

View Source
const HeaderFileAnnotationPrefix = "x-katanomi-annotation-"

HeaderFileAnnotationPrefix is the annotation header prefix

View Source
const HeaderFileMeta = "x-katanomi-file-meta"

HeaderFileMeta is the header name of file meta

View Source
const HeaderFilePath = "x-katanomi-file-path"

HeaderFilePath is the file path to saved

View Source
const HeaderRunMeta = "x-katanomi-run-meta"

HeaderRunMeta is the header name of pipelinerun meta

View Source
const LastModifiedAnnotation = "storage.katanomi.dev/lastModified"

LastModifiedAnnotation for recording last modified time

View Source
const StorageAnnotationPrefix = "storage.katanomi.dev/annotation."

StorageAnnotationPrefix is prefix of user-defined annotations

View Source
const StorageEntryAnnotation = "storage.katanomi.dev/entry"

StorageEntryAnnotation for recording file entry of directory

View Source
const StoragePluginClassLabelKey = "storage.katanomi.dev/storagePluginClass" // NOSONAR // ignore: "Key" detected here, make sure this is not a hard-coded credential

StoragePluginClassLabelKey for labeling owner StoragePluginClass

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "storage.pkg.katanomi.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var FileMetaGVK = GroupVersion.WithKind("FileMeta")

FileMetaGVK for GVK of FileMeta

View Source
var FileMetaListGVK = GroupVersion.WithKind("FileMetaList")

FileMetaListGVK for GVK of FileMetaList

SupportedContentTypeList contains content types restful apis should consume

Functions

func FileMetaResourceAttributes

func FileMetaResourceAttributes(verb string) authv1.ResourceAttributes

FileMetaResourceAttributes returns a ResourceAttribute object to be used in a filter

func FileObjectResourceAttributes

func FileObjectResourceAttributes(verb string) authv1.ResourceAttributes

FileObjectResourceAttributes returns a ResourceAttribute object to be used in a filter

func ParseFileKey

func ParseFileKey(key string) (pluginName, fileObjectName string)

ParseFileKey returns pluginName and fileObjectName

Types

type FileMeta

type FileMeta struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec FileMetaSpec `json:"spec"`
}

FileMeta object for sources

func DecodeAsFileMeta

func DecodeAsFileMeta(encoded string) (*FileMeta, error)

DecodeAsFileMeta decodes encoded string to a pointer FileMeta

func (*FileMeta) DeepCopy

func (in *FileMeta) DeepCopy() *FileMeta

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

func (*FileMeta) DeepCopyInto

func (in *FileMeta) DeepCopyInto(out *FileMeta)

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

func (*FileMeta) Encode

func (in *FileMeta) Encode() string

Encode returns json base64 encoded string

func (*FileMeta) Key

func (in *FileMeta) Key() string

Key returns file key

func (*FileMeta) LastModified

func (in *FileMeta) LastModified() time.Time

LastModified return lastModifiedTime from storage server or zero time if no creation info

type FileMetaList

type FileMetaList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []FileMeta `json:"items"`
}

FileMetaList list of FileMetas

func (*FileMetaList) DeepCopy

func (in *FileMetaList) DeepCopy() *FileMetaList

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

func (*FileMetaList) DeepCopyInto

func (in *FileMetaList) DeepCopyInto(out *FileMetaList)

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

type FileMetaListOptions

type FileMetaListOptions struct {
	Prefix     string `json:"prefix,omitempty"`
	Recursive  bool   `json:"recursive,omitempty"`
	StartAfter string `json:"startAfter,omitempty"`
	Limit      int    `json:"limit,omitempty"`
}

FileMetaListOptions for list option of FileMeta

func (*FileMetaListOptions) DeepCopy

func (in *FileMetaListOptions) DeepCopy() *FileMetaListOptions

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

func (*FileMetaListOptions) DeepCopyInto

func (in *FileMetaListOptions) DeepCopyInto(out *FileMetaListOptions)

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

type FileMetaSpec

type FileMetaSpec struct {
	// Entry shows the index file of a directory if the contentType is a site
	// +optional
	Entry string `json:"entry,omitempty"`

	// Key for file key of file object, following format:  {storage-plugin-name}/-/{file-object-name}
	// +optional
	Key string `json:"key,omitempty"`

	// ContentType for file content type
	ContentType string `json:"contentType"`

	// ContentLength for file content size
	ContentLength int64 `json:"contentLength"`

	// FileType for file type
	// +optional
	FileType string `json:"fileType,omitempty"`
}

FileMetaSpec spec for FileMeta

func (*FileMetaSpec) DeepCopy

func (in *FileMetaSpec) DeepCopy() *FileMetaSpec

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

func (*FileMetaSpec) DeepCopyInto

func (in *FileMetaSpec) DeepCopyInto(out *FileMetaSpec)

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

type StorageAuthCheck

type StorageAuthCheck struct {
	metav1.TypeMeta `json:",inline"`
	Status          v1alpha1.AuthCheckStatus `json:"status"`
}

StorageAuthCheck consists of result for an auth check request +k8s:deepcopy-gen=false

type StorageAuthCheckRequest

type StorageAuthCheckRequest struct {
	StoragePluginName string           `json:"storagePluginName"`
	Params            []v1alpha1.Param `json:"params"`
}

StorageAuthCheckRequest is used for request entity of auth check use this struct rather than corev1.StoragePlugin to avoid import cycle

func (*StorageAuthCheckRequest) DeepCopy

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

func (*StorageAuthCheckRequest) DeepCopyInto

func (in *StorageAuthCheckRequest) DeepCopyInto(out *StorageAuthCheckRequest)

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

Jump to

Keyboard shortcuts

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