Documentation
¶
Index ¶
- func ConstructPath(sections []string, separator string) string
- func GetBool(w WithParameters, key string) (b bool)
- func GetDuration(w WithParameters, key string) (d time.Duration)
- func GetFloat64(w WithParameters, key string) (f64 float64)
- func GetInt(w WithParameters, key string) (i int)
- func GetInt64(w WithParameters, key string) (i64 int64)
- func GetString(w WithParameters, key string) (s string)
- func GetStringMap(w WithParameters, key string) (sm map[string]any)
- func GetStringMapString(w WithParameters, key string) (sms map[string]string)
- func GetStringMapStringSlice(w WithParameters, key string) (smss map[string][]string)
- func GetStringSlice(w WithParameters, key string) (ss []string)
- func GetTime(w WithParameters, key string) (t time.Time)
- func GetUint(w WithParameters, key string) (ui uint)
- func GetUint64(w WithParameters, key string) (ui64 uint64)
- func HasParameter(w WithParameters, key string) bool
- type CreatedAt
- type CreatedAtBase
- type ID
- type IDBase
- type Object
- type ObjectBase
- type ObjectWithMonth
- type ObjectWithMonthBase
- type UpdatedAt
- type UpdatedAtBase
- type WithActive
- type WithActiveBase
- type WithDescription
- type WithDescriptionBase
- type WithID
- type WithIDStub
- type WithLongName
- type WithLongNameBase
- type WithName
- type WithNameAndPath
- type WithNameAndPathBase
- type WithNameAndPathParentBase
- type WithNameBase
- type WithNameBaseConfig
- type WithParameters
- type WithPath
- type WithPathBase
- func (w *WithPathBase) FullPath() string
- func (w *WithPathBase) Init(path string, separator ...string)
- func (w *WithPathBase) Path() string
- func (w *WithPathBase) Paths() []string
- func (w *WithPathBase) Sections() []string
- func (w *WithPathBase) Separator() string
- func (w *WithPathBase) SetParent(parent WithPath)
- type WithPathParent
- type WithPathParentBase
- type WithRefId
- type WithRefIdBase
- type WithType
- type WithTypeBase
- type WithUniqueName
- type WithUniqueNameBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructPath ¶
func GetBool ¶
func GetBool(w WithParameters, key string) (b bool)
GetBool returns the value associated with the key as a boolean.
func GetDuration ¶
func GetDuration(w WithParameters, key string) (d time.Duration)
GetDuration returns the value associated with the key as a duration.
func GetFloat64 ¶
func GetFloat64(w WithParameters, key string) (f64 float64)
GetFloat64 returns the value associated with the key as a float64.
func GetInt ¶
func GetInt(w WithParameters, key string) (i int)
GetInt returns the value associated with the key as an integer.
func GetInt64 ¶
func GetInt64(w WithParameters, key string) (i64 int64)
GetInt64 returns the value associated with the key as an integer.
func GetString ¶
func GetString(w WithParameters, key string) (s string)
GetString returns the value associated with the key as a string.
func GetStringMap ¶
func GetStringMap(w WithParameters, key string) (sm map[string]any)
GetStringMap returns the value associated with the key as a map of interfaces.
func GetStringMapString ¶
func GetStringMapString(w WithParameters, key string) (sms map[string]string)
GetStringMapString returns the value associated with the key as a map of strings.
func GetStringMapStringSlice ¶
func GetStringMapStringSlice(w WithParameters, key string) (smss map[string][]string)
GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings.
func GetStringSlice ¶
func GetStringSlice(w WithParameters, key string) (ss []string)
GetStringSlice returns the value associated with the key as a slice of strings.
func GetTime ¶
func GetTime(w WithParameters, key string) (t time.Time)
GetTime returns the value associated with the key as time.
func GetUint ¶
func GetUint(w WithParameters, key string) (ui uint)
GetUint returns the value associated with the key as an unsigned integer.
func GetUint64 ¶
func GetUint64(w WithParameters, key string) (ui64 uint64)
GetUint64 returns the value associated with the key as an unsigned integer.
func HasParameter ¶
func HasParameter(w WithParameters, key string) bool
HasParameter check if parameter with given key exists.
Types ¶
type CreatedAtBase ¶
type CreatedAtBase struct {
CREATED_AT time.Time `gorm:"index;autoCreateTime:false" json:"created_at" display:"Created"`
}
func (*CreatedAtBase) GetCreatedAt ¶
func (w *CreatedAtBase) GetCreatedAt() time.Time
func (*CreatedAtBase) InitCreatedAt ¶
func (w *CreatedAtBase) InitCreatedAt()
func (*CreatedAtBase) SetCreatedAt ¶
func (w *CreatedAtBase) SetCreatedAt(t time.Time)
type IDBase ¶
type IDBase struct {
ID string `gorm:"primary_key" json:"id" display:"ID"`
}
func (*IDBase) GenerateID ¶
func (o *IDBase) GenerateID()
type ObjectBase ¶
type ObjectBase struct { IDBase CreatedAtBase UpdatedAtBase }
func (*ObjectBase) InitObject ¶
func (o *ObjectBase) InitObject()
type ObjectWithMonth ¶
type ObjectWithMonthBase ¶
type ObjectWithMonthBase struct { ObjectBase utils.MonthDataBase }
func (*ObjectWithMonthBase) InitObject ¶
func (o *ObjectWithMonthBase) InitObject()
type UpdatedAtBase ¶
type UpdatedAtBase struct {
UPDATED_AT time.Time `gorm:"index;autoUpdateTime:false" json:"updated_at" display:"Updated"`
}
func (*UpdatedAtBase) GetUpdatedAt ¶
func (w *UpdatedAtBase) GetUpdatedAt() time.Time
func (*UpdatedAtBase) SetUpDatedAt ¶
func (w *UpdatedAtBase) SetUpDatedAt(t time.Time)
type WithActive ¶
type WithActiveBase ¶
type WithActiveBase struct {
ACTIVE bool `gorm:"index" json:"active" default:"true" long:"active" description:"Active"`
}
func (*WithActiveBase) Init ¶
func (d *WithActiveBase) Init(notActive ...bool)
func (*WithActiveBase) IsActive ¶
func (d *WithActiveBase) IsActive() bool
func (*WithActiveBase) SetActive ¶
func (d *WithActiveBase) SetActive(value bool)
type WithDescription ¶
type WithDescriptionBase ¶
type WithDescriptionBase struct {
DESCRIPTION string `json:"description,omitempty" gorm:"column:description" long:"description" description:"Additional description"`
}
func (*WithDescriptionBase) Description ¶
func (d *WithDescriptionBase) Description() string
func (*WithDescriptionBase) SetDescription ¶
func (d *WithDescriptionBase) SetDescription(value string)
type WithIDStub ¶
type WithIDStub struct { }
func (*WithIDStub) GetID ¶
func (w *WithIDStub) GetID() string
type WithLongName ¶
type WithLongNameBase ¶
type WithLongNameBase struct {
LONG_NAME string `json:"long_name,omitempty"`
}
func (*WithLongNameBase) LongName ¶
func (t *WithLongNameBase) LongName() string
func (*WithLongNameBase) SetLongName ¶
func (t *WithLongNameBase) SetLongName(value string)
type WithNameAndPath ¶
type WithNameAndPathBase ¶
type WithNameAndPathBase struct { WithNameBase WithPathBase }
Base type for types having name and path.
type WithNameAndPathParentBase ¶
type WithNameAndPathParentBase struct { WithNameBase WithPathParentBase }
Base type for types having name and path and children.
type WithNameBase ¶
type WithNameBase = WithNameBaseConfig
type WithNameBaseConfig ¶
type WithNameBaseConfig struct {
NAME string `gorm:"index" json:"name,omitempty"`
}
func (*WithNameBaseConfig) Init ¶
func (e *WithNameBaseConfig) Init(name string)
func (*WithNameBaseConfig) Name ¶
func (w *WithNameBaseConfig) Name() string
func (*WithNameBaseConfig) SetName ¶
func (w *WithNameBaseConfig) SetName(name string)
type WithParameters ¶
type WithParameters interface { GetParameter(key string) (any, bool) SetParameter(key string, value interface{}) }
Base interface for types with parameters.
type WithPath ¶
type WithPath interface { Path() string FullPath() string Paths() []string Sections() []string Separator() string SetParent(parent WithPath) }
Interface for type having name and path.
type WithPathBase ¶
type WithPathBase struct {
// contains filtered or unexported fields
}
Base type for types having name and path.
func (*WithPathBase) FullPath ¶
func (w *WithPathBase) FullPath() string
func (*WithPathBase) Init ¶
func (w *WithPathBase) Init(path string, separator ...string)
func (*WithPathBase) Path ¶
func (w *WithPathBase) Path() string
func (*WithPathBase) Paths ¶
func (w *WithPathBase) Paths() []string
func (*WithPathBase) Sections ¶
func (w *WithPathBase) Sections() []string
func (*WithPathBase) Separator ¶
func (w *WithPathBase) Separator() string
func (*WithPathBase) SetParent ¶
func (w *WithPathBase) SetParent(parent WithPath)
type WithPathParent ¶
type WithPathParentBase ¶
type WithPathParentBase struct {
WithPathBase
}
Base type for types having name and path and children.
func (*WithPathParentBase) AddChild ¶
func (w *WithPathParentBase) AddChild(child WithPath)
type WithRefIdBase ¶
type WithRefIdBase struct {
REFID string `gorm:"index" json:"refid"`
}
func (*WithRefIdBase) RefId ¶
func (t *WithRefIdBase) RefId() string
func (*WithRefIdBase) SetRefId ¶
func (t *WithRefIdBase) SetRefId(value string)
type WithTypeBase ¶
type WithTypeBase struct {
TYPE_NAME string `gorm:"index;column:type_name" json:"type_name" validate:"required" vmessage:"Type can not be empty"`
}
func (*WithTypeBase) SetTypeName ¶
func (t *WithTypeBase) SetTypeName(value string)
func (*WithTypeBase) TypeName ¶
func (t *WithTypeBase) TypeName() string
type WithUniqueName ¶
type WithUniqueName interface { WithName }
type WithUniqueNameBase ¶
type WithUniqueNameBase struct {
NAME string `gorm:"uniqueIndex" json:"name" validate:"required" vmessage:"Name can not be empty" long:"name" description:"Unique name"`
}
func (*WithUniqueNameBase) Name ¶
func (w *WithUniqueNameBase) Name() string
func (*WithUniqueNameBase) SetName ¶
func (w *WithUniqueNameBase) SetName(name string)