Documentation
¶
Index ¶
- Constants
- func Box[T any](v T) *T
- func Empty[T any]() (out T)
- func EmptyIfNil[T any](v *T) T
- func FirstNonEmpty[T comparable](values ...T) T
- func IsEmpty[T comparable](in T) bool
- func IsNil(m any) bool
- func IsNilOrEmpty[T comparable](in *T) bool
- func NamedOutput(in interface{}) interface{}
- func NilIfEmpty[T comparable](in T) *T
- func Unbox[T any](v *T, def T) T
- func UnboxWith[T any](v *T, mkDef func() T) T
- func UuidWithDashes(uuid *string) (*string, error)
- type ConfigProvider
- type Identifiable
- type Identifier
- type Keyed
- type ModelId
- type Nameable
- type NamedOutputV0
- type Resource
- type ResourceContextAware
- type Transformer
- type TransformerMap
- type TransformerResolver
Constants ¶
View Source
const NamedView = "named"
Variables ¶
This section is empty.
Functions ¶
func EmptyIfNil ¶
func EmptyIfNil[T any](v *T) T
func FirstNonEmpty ¶ added in v0.40.4
func FirstNonEmpty[T comparable](values ...T) T
func IsEmpty ¶ added in v0.40.4
func IsEmpty[T comparable](in T) bool
func IsNilOrEmpty ¶
func IsNilOrEmpty[T comparable](in *T) bool
func NamedOutput ¶
func NamedOutput(in interface{}) interface{}
func NilIfEmpty ¶
func NilIfEmpty[T comparable](in T) *T
func UuidWithDashes ¶
Types ¶
type ConfigProvider ¶
type Identifiable ¶
type Identifiable interface {
GetId() *uint
}
type Identifier ¶
type Identifier struct {
Id *uint `json:"id" binding:"required"`
}
func WithIdentifier ¶
func WithIdentifier(id *uint) *Identifier
func (*Identifier) GetId ¶
func (i *Identifier) GetId() *uint
type ModelId ¶
type ModelId struct {
Project string `cfg:"project" default:"{app_project}"`
Environment string `cfg:"environment" default:"{env}"`
Family string `cfg:"family" default:"{app_family}"`
Group string `cfg:"group" default:"{app_group}"`
Application string `cfg:"application" default:"{app_name}"`
Name string `cfg:"name"`
}
func ModelIdFromString ¶
func (*ModelId) PadFromConfig ¶
func (m *ModelId) PadFromConfig(config ConfigProvider)
type Nameable ¶
type Nameable interface {
Identifiable
GetName() *string
}
type NamedOutputV0 ¶
type ResourceContextAware ¶
type ResourceContextAware interface {
GetResourceContext() map[string]interface{}
}
type Transformer ¶
type Transformer func(in interface{}) (out interface{})
type TransformerMap ¶
type TransformerMap map[string]map[int]Transformer
type TransformerResolver ¶
func Transform ¶
func Transform(transformers TransformerMap) TransformerResolver
Click to show internal directories.
Click to hide internal directories.