Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { Base Body string `json:"body,omitempty"` EntityID int `json:"entity_id,omitempty"` DeletedAt gorm.DeletedAt }
Attribute TODO Avoid dependence on gorm.
func ToAttribute ¶
func ToAttribute(dto AttributeDTO) *Attribute
ToAttribute convert to Attribute, return Attribute pointer
func (*Attribute) SetDTO ¶
func (attribute *Attribute) SetDTO(dto AttributeDTO)
type AttributeDTO ¶
type AttributeQuery ¶
type AttributeQuery struct { Query string `form:"query"` Page int `form:"page"` PageSize int `form:"page_size"` }
Entity - A single entity.
type Base ¶
type Base struct { ID int `json:"id,omitempty" gorm:"primary_key;"` CreatedAt time.Time `json:"created_time,omitempty"` UpdatedAt time.Time `json:"updated_time,omitempty"` }
func (*Base) GetCreatedAt ¶
func (*Base) GetUpdatedAt ¶
func (*Base) SetCurrentTimeUpdatedAt ¶
func (base *Base) SetCurrentTimeUpdatedAt()
type Credential ¶ added in v0.1.4
Entity - A single entity.
type Entity ¶
type Entity struct { Base Body string `json:"body,omitempty"` DeletedAt gorm.DeletedAt Attributes []Attribute `json:"attributes,omitempty"` }
Entity - A single entity.
func (*Entity) SetRequest ¶
type EntityQuery ¶
type EntityQuery struct { Query string `form:"query"` Page int `form:"page"` PageSize int `form:"page_size"` }
Entity - A single entity.
Click to show internal directories.
Click to hide internal directories.