Documentation ¶
Index ¶
- Variables
- func Commands() []*cli.Command
- func GenerateRandomFilter(gtx context.Context, dataType string) (*data.Filter, error)
- func GetDataForRandomFilter(gtx context.Context, dataType string, out any) error
- func GetRandomFilter(gtx context.Context, dataType string, filterSpecs []*data.FilterSpec, ...) (*data.Filter, error)
- func PgCreateFill(gtx context.Context) error
- type FkItem
- type FkUser
Constants ¶
This section is empty.
Variables ¶
View Source
var ItemFilterSpec = []*data.FilterSpec{ {Field: "name", Name: "Name", Type: data.FtProp}, {Field: "description", Name: "Description", Type: data.FtProp}, {Field: "created", Name: "Created", Type: data.FtProp}, {Field: "updated", Name: "Updated", Type: data.FtProp}, }
View Source
var UserFilterSpec = []*data.FilterSpec{ {Field: "name", Name: "Name", Type: data.FtProp}, {Field: "status", Name: "Status", Type: data.FtProp}, }
Functions ¶
func GenerateRandomFilter ¶
func GetDataForRandomFilter ¶
func GetRandomFilter ¶
func GetRandomFilter( gtx context.Context, dataType string, filterSpecs []*data.FilterSpec, filterValues *data.FilterValues) (*data.Filter, error)
func PgCreateFill ¶
Types ¶
type FkUser ¶
type FkUser struct { Id int `db:"id" fake:"skip"` Name string `db:"name" fake:"{name}"` FirstName string `db:"first_name" fake:"{firstname}"` LastName string `db:"last_name" fake:"{lastname}"` Email string `db:"email" fake:"{email}"` Age int `db:"age" fake:"{number:1,100}"` Tags data.Vec[string] `db:"tags" fakesize:"2"` Status string `db:"status" fake:"{randomstring:[active,inactive]}"` Created time.Time `db:"created"` Updated time.Time `db:"updated"` }
Click to show internal directories.
Click to hide internal directories.