pkgrevid

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Overview

+kubebuilder:object:generate=true

Index

Constants

View Source
const (
	NoRevision  = "v0"
	Anyrevision = "*"
)
View Source
const (
	PkgTarget_Catalog = "catalog"
)

Variables

View Source
var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetRepoNameFromPkgRevName

func GetRepoNameFromPkgRevName(name string) string

func IsRevLater

func IsRevLater(currentRev, latestRev string) bool

func LatestRevisionNumber

func LatestRevisionNumber(revs []string) string

LatestRevisionNumber computes the latest revision number of a given list. This function only understands strict versioning format, e.g. v1, v2, etc. It will ignore all revision numbers it finds that do not adhere to this format. If there are no published revisions (in the recognized format), the revision number returned here will be "v0".

func NextRevisionNumber

func NextRevisionNumber(revs []string) (string, error)

NextRevisionNumber computes the next revision number as the latest revision number + 1. This function only understands strict versioning format, e.g. v1, v2, etc. It will ignore all revision numbers it finds that do not adhere to this format. If there are no published revisions (in the recognized format), the revision number returned here will be "v1".

func PackageToDir

func PackageToDir(pkg string) string

func RealmToName

func RealmToName(pkg string) string

Types

type Downstream

type Downstream struct {
	// Target defines the target for the package; not relevant for catalog packages
	// e.g. a cluster
	Target string `json:"target,omitempty" protobuf:"bytes,1,opt,name=target"`
	// Repository defines the name of the Repository object containing this package.
	Repository string `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"`
	// Realm defines the scope in which the package is relevant
	Realm string `json:"realm,omitempty" protobuf:"bytes,3,opt,name=realm"`
	// Package defines the name of package in the repository.
	Package string `json:"package,omitempty" protobuf:"bytes,4,opt,name=package"`
}

+k8s:openapi-gen=true

func (*Downstream) DeepCopy

func (in *Downstream) DeepCopy() *Downstream

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

func (*Downstream) DeepCopyInto

func (in *Downstream) DeepCopyInto(out *Downstream)

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

func (*Downstream) Descriptor

func (*Downstream) Descriptor() ([]byte, []int)

func (*Downstream) Marshal

func (m *Downstream) Marshal() (dAtA []byte, err error)

func (*Downstream) MarshalTo

func (m *Downstream) MarshalTo(dAtA []byte) (int, error)

func (*Downstream) MarshalToSizedBuffer

func (m *Downstream) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Downstream) PkgString

func (r *Downstream) PkgString() string

func (*Downstream) ProtoMessage

func (*Downstream) ProtoMessage()

func (*Downstream) Reset

func (m *Downstream) Reset()

func (*Downstream) Size

func (m *Downstream) Size() (n int)

func (*Downstream) String

func (this *Downstream) String() string

func (*Downstream) Unmarshal

func (m *Downstream) Unmarshal(dAtA []byte) error

func (*Downstream) XXX_DiscardUnknown

func (m *Downstream) XXX_DiscardUnknown()

func (*Downstream) XXX_Marshal

func (m *Downstream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Downstream) XXX_Merge

func (m *Downstream) XXX_Merge(src proto.Message)

func (*Downstream) XXX_Size

func (m *Downstream) XXX_Size() int

func (*Downstream) XXX_Unmarshal

func (m *Downstream) XXX_Unmarshal(b []byte) error

type PackageRevID

type PackageRevID struct {
	// Target defines the target for the package; not relevant for catalog packages
	// e.g. a cluster
	Target string `json:"target,omitempty" protobuf:"bytes,1,opt,name=target"`
	// Repository defines the name of the Repository object containing this package.
	Repository string `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"`
	// Realm defines the scope in which the package is relevant
	Realm string `json:"realm,omitempty" protobuf:"bytes,3,opt,name=realm"`
	// Package defines the name of the package in the repository.
	Package string `json:"package,omitempty" protobuf:"bytes,4,opt,name=package"`
	// Revision defines the revision of the package once published
	Revision string `json:"revision,omitempty" protobuf:"bytes,5,opt,name=revision"`
	// Workspace defines the workspace of the package
	Workspace string `json:"workspace,omitempty" protobuf:"bytes,6,opt,name=workspace"`
}

+k8s:openapi-gen=true

func ParseBranch

func ParseBranch(tagstr string, catalog bool) (*PackageRevID, error)

func ParsePkgRev2PkgRevID

func ParsePkgRev2PkgRevID(pkgstr string) (*PackageRevID, error)

func ParseTag

func ParseTag(tagstr string, catalog bool) (*PackageRevID, error)

func (*PackageRevID) Branch

func (r *PackageRevID) Branch(catalog bool) string

func (*PackageRevID) DNSName

func (r *PackageRevID) DNSName() string

func (*PackageRevID) DeepCopy

func (in *PackageRevID) DeepCopy() *PackageRevID

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

func (*PackageRevID) DeepCopyInto

func (in *PackageRevID) DeepCopyInto(out *PackageRevID)

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

func (*PackageRevID) Descriptor

func (*PackageRevID) Descriptor() ([]byte, []int)

func (*PackageRevID) GitRevision

func (r *PackageRevID) GitRevision() string

func (*PackageRevID) Marshal

func (m *PackageRevID) Marshal() (dAtA []byte, err error)

func (*PackageRevID) MarshalTo

func (m *PackageRevID) MarshalTo(dAtA []byte) (int, error)

func (*PackageRevID) MarshalToSizedBuffer

func (m *PackageRevID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PackageRevID) OutDir

func (r *PackageRevID) OutDir() string

func (*PackageRevID) Path

func (r *PackageRevID) Path() string

func (*PackageRevID) PkgRevString

func (r *PackageRevID) PkgRevString() string

func (*PackageRevID) PkgString

func (r *PackageRevID) PkgString() string

func (*PackageRevID) ProtoMessage

func (*PackageRevID) ProtoMessage()

func (*PackageRevID) Reset

func (m *PackageRevID) Reset()

func (*PackageRevID) Size

func (m *PackageRevID) Size() (n int)

func (*PackageRevID) String

func (this *PackageRevID) String() string

func (*PackageRevID) Tag

func (r *PackageRevID) Tag(catalog bool) string

func (*PackageRevID) Unmarshal

func (m *PackageRevID) Unmarshal(dAtA []byte) error

func (*PackageRevID) XXX_DiscardUnknown

func (m *PackageRevID) XXX_DiscardUnknown()

func (*PackageRevID) XXX_Marshal

func (m *PackageRevID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PackageRevID) XXX_Merge

func (m *PackageRevID) XXX_Merge(src proto.Message)

func (*PackageRevID) XXX_Size

func (m *PackageRevID) XXX_Size() int

func (*PackageRevID) XXX_Unmarshal

func (m *PackageRevID) XXX_Unmarshal(b []byte) error

type PkgState

type PkgState int64
const (
	PkgState_NotAvailable PkgState = iota
	PkgState_Scheduled
	PkgState_Processed
	PkgState_Validated // policy
	PkgState_Approved
	PkgState_Installed
)

func (PkgState) String

func (r PkgState) String() string

type Upstream

type Upstream struct {
	// Repository defines the name of the Repository object containing this package.
	Repository string `json:"repository,omitempty" protobuf:"bytes,1,opt,name=repository"`
	// Realm defines the scope in which the package is relevant
	Realm string `json:"realm,omitempty" protobuf:"bytes,2,opt,name=realm"`
	// Package defines the name of package in the repository.
	Package string `json:"package,omitempty" protobuf:"bytes,3,opt,name=package"`
	// Revision defines the revision of the package once published
	Revision string `json:"revision,omitempty" protobuf:"bytes,4,opt,name=revision"`
}

+k8s:openapi-gen=true

func (*Upstream) DeepCopy

func (in *Upstream) DeepCopy() *Upstream

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

func (*Upstream) DeepCopyInto

func (in *Upstream) DeepCopyInto(out *Upstream)

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

func (*Upstream) Descriptor

func (*Upstream) Descriptor() ([]byte, []int)

func (*Upstream) Marshal

func (m *Upstream) Marshal() (dAtA []byte, err error)

func (*Upstream) MarshalTo

func (m *Upstream) MarshalTo(dAtA []byte) (int, error)

func (*Upstream) MarshalToSizedBuffer

func (m *Upstream) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Upstream) PkgRevName

func (r *Upstream) PkgRevName() string

func (*Upstream) PkgString

func (r *Upstream) PkgString() string

func (*Upstream) ProtoMessage

func (*Upstream) ProtoMessage()

func (*Upstream) Reset

func (m *Upstream) Reset()

func (*Upstream) Size

func (m *Upstream) Size() (n int)

func (*Upstream) String

func (this *Upstream) String() string

func (*Upstream) Unmarshal

func (m *Upstream) Unmarshal(dAtA []byte) error

func (*Upstream) XXX_DiscardUnknown

func (m *Upstream) XXX_DiscardUnknown()

func (*Upstream) XXX_Marshal

func (m *Upstream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Upstream) XXX_Merge

func (m *Upstream) XXX_Merge(src proto.Message)

func (*Upstream) XXX_Size

func (m *Upstream) XXX_Size() int

func (*Upstream) XXX_Unmarshal

func (m *Upstream) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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