Documentation ¶
Index ¶
- Constants
- func MakeSlug(s string) string
- func RemoveMostNonAlphanumeric(s string) string
- func RemoveNonAlphanumeric(s string) string
- func TypeToFlavor(dt, udt, cd string) string
- type BaseModel
- func (b *BaseModel) GetBool(name string) (bool, bool)
- func (b *BaseModel) GetBytes(name string) []byte
- func (b *BaseModel) GetFloat(name string) float64
- func (b *BaseModel) GetFloatAsInt(name string) int64
- func (b *BaseModel) GetInt(name string) int64
- func (b *BaseModel) GetList(name string) []any
- func (b *BaseModel) GetMap(name string) map[string]any
- func (b *BaseModel) GetSimpleBool(name string) bool
- func (b *BaseModel) GetString(name string) string
- func (b *BaseModel) GetStringOk(name string) (string, bool)
- func (b *BaseModel) GetTime(name string) time.Time
- type Field
- type Model
- func (m *Model) CurlListResponse() string
- func (m *Model) CurlPostPayload() string
- func (m *Model) CurlPutPayload() string
- func (m *Model) CurlResponse() any
- func (m *Model) CurlSingleResponse() string
- func (m *Model) CurlSingleResponseNoWrapper() string
- func (m *Model) EnsureIdAndCreatedAt()
- func (m *Model) ExampleAlFields() map[string]any
- func (m *Model) TableName() string
- type Path
- type Route
Constants ¶
View Source
const FULL_MONTH_DATE = "January 02, 2006"
View Source
const HUMAN = "Monday, January 2, 2006 3:04 PM"
View Source
const HUMAN_DATE = "2006-01-02"
View Source
const ISO8601 = "2006-01-02T15:04:05-07:00"
Variables ¶
This section is empty.
Functions ¶
func RemoveNonAlphanumeric ¶
func TypeToFlavor ¶
Types ¶
type Field ¶
type Field struct { Name string `json:"name"` Flavor string `json:"flavor"` Index string `json:"index"` Required string `json:"required"` Regex string `json:"regex"` Default string `json:"default"` Null string `json:"null"` JsonNames []string `json:"json_names"` JsonTypes []string `json:"json_types"` }
func (*Field) CommonExclude ¶
func (*Field) RandomValue ¶
func (*Field) SaneDefault ¶
func (*Field) SqlTypeAndDefault ¶
type Model ¶
type Model struct { Name string `json:"name"` Small bool `json:"small"` Fields []*Field `json:"fields"` }
func (*Model) CurlListResponse ¶
func (*Model) CurlPostPayload ¶
func (*Model) CurlPutPayload ¶
func (*Model) CurlResponse ¶
func (*Model) CurlSingleResponse ¶
func (*Model) CurlSingleResponseNoWrapper ¶
func (*Model) EnsureIdAndCreatedAt ¶
func (m *Model) EnsureIdAndCreatedAt()
func (*Model) ExampleAlFields ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.