kubepkg

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package kubepkg GENERATED BY gengo:enum DON'T EDIT THIS FILE

Package kubepkg GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Package kubepkg GENERATED BY gengo:table DON'T EDIT THIS FILE

Index

Constants

View Source
const (
	AnnotationName                = specutil.AnnotationName
	AnnotationChannel             = specutil.AnnotationChannel
	AnnotationRevision            = specutil.AnnotationRevision
	AnnotationDeploymentID        = specutil.AnnotationDeploymentID
	AnnotationDeploymentSettingID = specutil.AnnotationDeploymentSettingID
	AnnotationOverwrites          = specutil.AnnotationOverwrites
)

Variables

View Source
var InvalidChannel = github_com_pkg_errors.New("invalid Channel")
View Source
var VersionT = &tableVersion{
	ID:         github_com_octohelm_storage_pkg_sqlbuilder.CastCol[github_com_octohelm_storage_pkg_datatypes.SFID](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("ID")),
	KubepkgID:  github_com_octohelm_storage_pkg_sqlbuilder.CastCol[ID](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("KubepkgID")),
	Version:    github_com_octohelm_storage_pkg_sqlbuilder.CastCol[string](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("Version")),
	Major:      github_com_octohelm_storage_pkg_sqlbuilder.CastCol[int](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("Major")),
	Minor:      github_com_octohelm_storage_pkg_sqlbuilder.CastCol[int](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("Minor")),
	Patch:      github_com_octohelm_storage_pkg_sqlbuilder.CastCol[int](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("Patch")),
	Channel:    github_com_octohelm_storage_pkg_sqlbuilder.CastCol[Channel](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("Channel")),
	RevisionID: github_com_octohelm_storage_pkg_sqlbuilder.CastCol[RevisionID](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("RevisionID")),
	CreatedAt:  github_com_octohelm_storage_pkg_sqlbuilder.CastCol[github_com_octohelm_storage_pkg_datatypes.Timestamp](github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).F("CreatedAt")),

	I: indexNameOfVersion{
		Primary: github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).Cols([]string{
			"ID",
		}...),
		IVersion: github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}).Cols([]string{
			"KubepkgID",
			"Channel",
			"Version",
		}...),
	},
	table: github_com_octohelm_storage_pkg_sqlbuilder.TableFromModel(&Version{}),
}

Functions

This section is empty.

Types

type Channel

type Channel uint8

+gengo:enum

const (
	CHANNEL_UNKNOWN Channel = iota
	CHANNEL__DEV            // 开发
	CHANNEL__BETA           // 测试
	CHANNEL__RC             // 预览
	CHANNEL__STABLE         // 正式
)

func ParseChannelFromString

func ParseChannelFromString(s string) (Channel, error)

func ParseChannelLabelString

func ParseChannelLabelString(label string) (Channel, error)

func (Channel) EnumValues

func (Channel) EnumValues() []any

func (Channel) Label

func (v Channel) Label() string

func (Channel) MarshalText

func (v Channel) MarshalText() ([]byte, error)

func (Channel) RuntimeDoc

func (Channel) RuntimeDoc(names ...string) ([]string, bool)

func (*Channel) Scan

func (v *Channel) Scan(src any) error

func (Channel) String

func (v Channel) String() string

func (*Channel) UnmarshalText

func (v *Channel) UnmarshalText(data []byte) error

func (Channel) Value

func (v Channel) Value() (database_sql_driver.Value, error)

type ID

type ID uint64

func (ID) MarshalText

func (id ID) MarshalText() (text []byte, err error)

func (ID) RuntimeDoc

func (ID) RuntimeDoc(names ...string) ([]string, bool)

func (ID) String

func (id ID) String() string

func (*ID) UnmarshalText

func (id *ID) UnmarshalText(text []byte) error

type Kubepkg

type Kubepkg struct {
	// Kubepkg ID
	ID ID `db:"f_kubepkg_id" json:"kubepkgID"`

	// Kubepkg Group
	Group string `db:"f_group" json:"group"`
	// Kubepkg 名称
	Name string `db:"f_name" json:"name"`

	datatypes.CreationUpdationDeletionTime
}

+gengo:table:register=T +gengo:table:group=kubepkg @def primary ID DeletedAt @def unique_index i_name Group Name @def index i_created_at CreatedAt @def index i_updated_at UpdatedAt

func (Kubepkg) Primary

func (Kubepkg) Primary() []string

func (Kubepkg) RuntimeDoc

func (v Kubepkg) RuntimeDoc(names ...string) ([]string, bool)

func (Kubepkg) TableName

func (Kubepkg) TableName() string

type KubepkgQueryParams

type KubepkgQueryParams struct {
	Names []string `name:"name,omitempty" in:"query"`

	datatypes.Pager
}

func (KubepkgQueryParams) RuntimeDoc

func (v KubepkgQueryParams) RuntimeDoc(names ...string) ([]string, bool)

type Ref

type Ref struct {
	KubepkgID          ID
	KubepkgRevisionID  RevisionID
	SettingID          uint64
	Overwrites         map[string]any
	DefaultsOverwrites map[string]any
}

func (Ref) RuntimeDoc

func (v Ref) RuntimeDoc(names ...string) ([]string, bool)

func (Ref) WithSettingID

func (r Ref) WithSettingID(settingID uint64) *Ref

type Revision

type Revision struct {
	// Kubepkg Revision ID
	ID RevisionID `db:"f_revision_id" json:"0"`

	KubepkgID ID `db:"f_kubepkg_id" json:"-"`

	// hash of spec
	Digest string `db:"f_digest" json:"-"`
	// spec
	Spec []byte `db:"f_spec" json:"-"`

	datatypes.CreationTime
}

+gengo:table:register=T +gengo:table:group=kubepkg @def primary ID @def unique_index i_digest KubepkgID Digest @def index i_created_at CreatedAt

func (Revision) Primary

func (Revision) Primary() []string

func (Revision) RuntimeDoc

func (v Revision) RuntimeDoc(names ...string) ([]string, bool)

func (Revision) TableName

func (Revision) TableName() string

type RevisionID

type RevisionID uint64

func (RevisionID) MarshalText

func (id RevisionID) MarshalText() (text []byte, err error)

func (RevisionID) RuntimeDoc

func (RevisionID) RuntimeDoc(names ...string) ([]string, bool)

func (RevisionID) String

func (id RevisionID) String() string

func (*RevisionID) UnmarshalText

func (id *RevisionID) UnmarshalText(text []byte) error

type Version

type Version struct {
	ID datatypes.SFID `db:"f_id" json:"-"`

	KubepkgID ID `db:"f_kubepkg_id" json:"kubepkgID"`
	// 版本号
	Version string `db:"f_version" json:"version"`

	Major int `db:"major,default=0" json:"-"`
	Minor int `db:"minor,default=0" json:"-"`
	Patch int `db:"patch,default=0" json:"-"`

	// 版本分支
	Channel Channel `db:"f_channel,default=1" json:"channel"`

	RevisionID RevisionID `db:"f_kubepkg_revision_id" json:"revisionID"`

	datatypes.CreationTime
}

+gengo:table:register=T +gengo:table:group=kubepkg @def primary ID @def unique_index i_version KubepkgID Channel Version @def index i_semver Major Minor Patch @def index i_created_at CreatedAt

func (Version) Primary

func (Version) Primary() []string

func (Version) RuntimeDoc

func (v Version) RuntimeDoc(names ...string) ([]string, bool)

func (Version) TableName

func (Version) TableName() string

type VersionInfo

type VersionInfo struct {
	RevisionID RevisionID `json:"revisionID"`
	Version    string     `json:"version"`
}

func (VersionInfo) RuntimeDoc

func (v VersionInfo) RuntimeDoc(names ...string) ([]string, bool)

Directories

Path Synopsis
Package repository GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Package repository GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Jump to

Keyboard shortcuts

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