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
- Variables
- func FileMetaResourceAttributes(verb string) authv1.ResourceAttributes
- func FileObjectResourceAttributes(verb string) authv1.ResourceAttributes
- func ParseFileKey(key string) (pluginName, fileObjectName string)
- type FileMeta
- type FileMetaList
- type FileMetaListOptions
- type FileMetaSpec
- type StorageAuthCheck
- type StorageAuthCheckRequest
Constants ¶
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" )
const FileTypeAnnotation = "storage.katanomi.dev/fileType"
FileTypeAnnotation for recording business file type of file object
const HeaderFileAnnotationPrefix = "x-katanomi-annotation-"
HeaderFileAnnotationPrefix is the annotation header prefix
const HeaderFileMeta = "x-katanomi-file-meta"
HeaderFileMeta is the header name of file meta
const HeaderFilePath = "x-katanomi-file-path"
HeaderFilePath is the file path to saved
const HeaderRunMeta = "x-katanomi-run-meta"
HeaderRunMeta is the header name of pipelinerun meta
const LastModifiedAnnotation = "storage.katanomi.dev/lastModified"
LastModifiedAnnotation for recording last modified time
const StorageAnnotationPrefix = "storage.katanomi.dev/annotation."
StorageAnnotationPrefix is prefix of user-defined annotations
const StorageEntryAnnotation = "storage.katanomi.dev/entry"
StorageEntryAnnotation for recording file entry of directory
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 ¶
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 )
var FileMetaGVK = GroupVersion.WithKind("FileMeta")
FileMetaGVK for GVK of FileMeta
var FileMetaListGVK = GroupVersion.WithKind("FileMetaList")
FileMetaListGVK for GVK of FileMetaList
var SupportedContentTypeList = []string{ restful.MIME_OCTET, FileContentTypeJunitXML, FileContentTypeAllureSite, FileContentTypeGoJson, FileContentTypeJacocoSite, FileContentTypeGolangCoverageTxt, }
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 ¶
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 ¶
DecodeAsFileMeta decodes encoded string to a pointer FileMeta
func (*FileMeta) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileMeta.
func (*FileMeta) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FileMeta) LastModified ¶
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 ¶
func (in *StorageAuthCheckRequest) DeepCopy() *StorageAuthCheckRequest
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.