Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeOptions ¶
type AuthorizeOptions struct {
TypeMeta `json:",inline"`
}
type CreateOptions ¶
type DeleteMeta ¶
type DeleteMeta struct {
DeletedAt soft_delete.DeletedAt `json:"deleted_at,omitempty" gorm:"type:int(11);column:deleted_at;comment:删除时间"`
}
DeleteMeta is delete meta data.
type DeleteOptions ¶
type Extend ¶
type Extend map[string]interface{}
type GetOptions ¶
type GetOptions struct {
TypeMeta `json:",inline"`
}
GetOptions is the standard query options to the standard REST get call.
type ListInterface ¶
type ListOptions ¶
type ListOptions struct { TypeMeta `json:",inline"` LabelSelector string `json:"label_selector,omitempty" form:"label_selector"` FieldSelector string `json:"field_selector,omitempty" form:"field_selector"` TimeoutSeconds *int64 `json:"timeout_seconds,omitempty"` Offset *int64 `json:"offset,omitempty" form:"offset"` Limit *int64 `json:"limit,omitempty" form:"limit"` }
type ObjectMeta ¶
type ObjectMeta struct { ID uint64 `json:"id,omitempty" gorm:"primaryKey;autoIncrement;column:id"` // InstanceID defines a string type resource identifier, // use prefixed to distinguish resource types, easy to remember, Url-friendly. InstanceID string `json:"instance_id,omitempty" gorm:"unique;column:instance_id;type:varchar(32);not null"` // Required: true // Name must be unique. Is required when creating resources. // Name is primarily intended for creation idempotence and configuration // definition. // It will be generated automated only if Name is not specified. // Cannot be updated. Name string `json:"name,omitempty" gorm:"column:name;type:varchar(64);not null;comment:资源名"` CreatedAt int64 `json:"created_at,omitempty" gorm:"type:int(11);not null;column:created_at;comment:创建时间;"` UpdatedAt int64 `json:"updated_at,omitempty" gorm:"type:int(11);not null;column:updated_at;comment:更新时间;"` CreatedAtFormat string `json:"created_at_format,omitempty" gorm:"-"` UpdatedAtFormat string `json:"updated_at_format,omitempty" gorm:"-"` // 拓展字段 Extend Extend `json:"extend,omitempty" gorm:"-"` ExtendShadow string `json:"-" gorm:"column:extend_shadow"` }
func (*ObjectMeta) AfterFind ¶
func (obj *ObjectMeta) AfterFind(tx *gorm.DB) error
AfterFind run after find to unmarshal a extend shadown string into metav1.Extend struct.
func (*ObjectMeta) BeforeCreate ¶
func (obj *ObjectMeta) BeforeCreate(tx *gorm.DB) error
BeforeCreate run before create database record.
func (*ObjectMeta) BeforeUpdate ¶
func (obj *ObjectMeta) BeforeUpdate(tx *gorm.DB) error
BeforeUpdate run before update database record.
type PatchOptions ¶
type TableOptions ¶
type UpdateOptions ¶
Click to show internal directories.
Click to hide internal directories.