Documentation
¶
Index ¶
- Constants
- Variables
- type BaseEntity
- func (r *BaseEntity[T]) GetAttributes() *T
- func (r *BaseEntity[T]) GetCustomProperties() *[]Properties
- func (r *BaseEntity[T]) GetID() *int32
- func (r *BaseEntity[T]) GetProperties() *[]Properties
- func (r *BaseEntity[T]) GetTypeID() *int32
- func (r *BaseEntity[T]) SetID(n int32)
- func (r *BaseEntity[T]) SetTypeID(n int32)
- type Entity
- type ListWrapper
- type Pagination
- type Properties
- func NewBoolProperty(name string, value bool, isCustom bool) Properties
- func NewByteProperty(name string, value []byte, isCustom bool) Properties
- func NewDoubleProperty(name string, value float64, isCustom bool) Properties
- func NewIntProperty(name string, value int32, isCustom bool) Properties
- func NewStringProperty(name string, value string, isCustom bool) Properties
- type Type
- type TypeAttributes
- type TypeImpl
- type TypeProperty
- type TypePropertyImpl
- type TypePropertyRepository
- type TypeRepository
Constants ¶
View Source
const ( SortOrderAsc = "ASC" SortOrderDesc = "DESC" OrderByID = "id" )
Variables ¶
View Source
var ( DefaultSortOrder = SortOrderAsc DefaultPageSize = int32(0) DefaultOrderBy = OrderByID )
Functions ¶
This section is empty.
Types ¶
type BaseEntity ¶
type BaseEntity[T any] struct { ID *int32 TypeID *int32 Attributes *T Properties *[]Properties CustomProperties *[]Properties }
func (*BaseEntity[T]) GetAttributes ¶
func (r *BaseEntity[T]) GetAttributes() *T
func (*BaseEntity[T]) GetCustomProperties ¶
func (r *BaseEntity[T]) GetCustomProperties() *[]Properties
func (*BaseEntity[T]) GetID ¶
func (r *BaseEntity[T]) GetID() *int32
func (*BaseEntity[T]) GetProperties ¶
func (r *BaseEntity[T]) GetProperties() *[]Properties
func (*BaseEntity[T]) GetTypeID ¶
func (r *BaseEntity[T]) GetTypeID() *int32
func (*BaseEntity[T]) SetID ¶
func (r *BaseEntity[T]) SetID(n int32)
func (*BaseEntity[T]) SetTypeID ¶
func (r *BaseEntity[T]) SetTypeID(n int32)
type Entity ¶
type Entity[T any] interface { GetID() *int32 SetID(int32) GetTypeID() *int32 SetTypeID(int32) GetAttributes() *T GetProperties() *[]Properties GetCustomProperties() *[]Properties }
type ListWrapper ¶
type Pagination ¶
type Pagination struct {
PageSize *int32 `json:"pageSize,omitempty"`
OrderBy *string `json:"orderBy,omitempty"`
SortOrder *string `json:"sortOrder,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
FilterQuery *string `json:"filterQuery,omitempty"`
}
func (*Pagination) GetFilterQuery ¶
func (p *Pagination) GetFilterQuery() string
func (*Pagination) GetNextPageToken ¶
func (p *Pagination) GetNextPageToken() string
func (*Pagination) GetOrderBy ¶
func (p *Pagination) GetOrderBy() string
func (*Pagination) GetPageSize ¶
func (p *Pagination) GetPageSize() int32
func (*Pagination) GetSortOrder ¶
func (p *Pagination) GetSortOrder() string
func (*Pagination) SetNextPageToken ¶
func (p *Pagination) SetNextPageToken(token *string)
type Properties ¶
type Properties struct {
Name string
IsCustomProperty bool
IntValue *int32
DoubleValue *float64
StringValue *string
BoolValue *bool
ByteValue *[]byte
ProtoValue *[]byte
}
func NewBoolProperty ¶
func NewBoolProperty(name string, value bool, isCustom bool) Properties
func NewByteProperty ¶
func NewByteProperty(name string, value []byte, isCustom bool) Properties
func NewDoubleProperty ¶
func NewDoubleProperty(name string, value float64, isCustom bool) Properties
func NewIntProperty ¶
func NewIntProperty(name string, value int32, isCustom bool) Properties
func NewStringProperty ¶
func NewStringProperty(name string, value string, isCustom bool) Properties
func (*Properties) SetInt64Value ¶
func (p *Properties) SetInt64Value(n int64)
type Type ¶
type Type interface {
GetID() *int32
GetAttributes() *TypeAttributes
}
type TypeAttributes ¶
type TypeImpl ¶
type TypeImpl struct {
ID *int32
Attributes *TypeAttributes
}
func (*TypeImpl) GetAttributes ¶
func (t *TypeImpl) GetAttributes() *TypeAttributes
type TypeProperty ¶
type TypePropertyImpl ¶
func (*TypePropertyImpl) GetDataType ¶
func (tp *TypePropertyImpl) GetDataType() *int32
func (*TypePropertyImpl) GetName ¶
func (tp *TypePropertyImpl) GetName() string
func (*TypePropertyImpl) GetTypeID ¶
func (tp *TypePropertyImpl) GetTypeID() int32
type TypePropertyRepository ¶
type TypePropertyRepository interface {
Save(tp TypeProperty) (TypeProperty, error)
}
Click to show internal directories.
Click to hide internal directories.