Documentation
¶
Index ¶
- Constants
- type Field
- type FieldOptions
- type Fileish
- type Filter
- type Index
- type Kind
- type Model
- type Op
- type Optioner
- type Ordering
- type Page
- type Query
- type Record
- type Registry
- type Relation
- type Schema
- func (s *Schema) BindableFields(only, except []string) []Field
- func (s *Schema) Columns() []string
- func (s *Schema) DisplayFields(includeKey bool) []Field
- func (s *Schema) Field(column string) (Field, bool)
- func (s *Schema) FormFields() []Field
- func (s *Schema) HasColumn(name string) bool
- func (s *Schema) Hide(columns []string)
- func (s *Schema) ListFields() []Field
- func (s *Schema) OrderBy(candidate string) []Ordering
- func (s *Schema) Relation(column string) (Relation, bool)
- func (s *Schema) SetListColumns(columns []string)
- func (s *Schema) SortColumn(candidate string) (string, string, bool)
- func (s *Schema) Visible() []Field
- type Store
Constants ¶
View Source
const Tag = "coyote"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type FieldOptions ¶
func ParseTag ¶
func ParseTag(tag string) FieldOptions
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
type Schema ¶
type Schema struct {
Table string
Slug string
Label string
Plural string
Fields []Field
Indexes []Index
Relations []Relation
Key Field
// contains filtered or unexported fields
}
func (*Schema) BindableFields ¶
func (*Schema) DisplayFields ¶
func (*Schema) FormFields ¶
func (*Schema) ListFields ¶
func (*Schema) SetListColumns ¶
type Store ¶
type Store interface {
List(ctx context.Context, schema *Schema, query Query) (Page, error)
Find(ctx context.Context, schema *Schema, id string) (Record, error)
Insert(ctx context.Context, schema *Schema, record Record) (string, error)
Update(ctx context.Context, schema *Schema, id string, record Record) error
Delete(ctx context.Context, schema *Schema, id string) error
Count(ctx context.Context, schema *Schema, query Query) (int64, error)
Exists(ctx context.Context, schema *Schema, query Query) (bool, error)
First(ctx context.Context, schema *Schema, query Query) (Record, error)
WithTx(tx *gorm.DB) Store
}
Click to show internal directories.
Click to hide internal directories.