Documentation
¶
Index ¶
- Variables
- type NotFoundError
- type Post
- func (obj *Post) Assign(v Post)
- func (obj Post) Columns() []string
- func (obj *Post) Destroy(ctx context.Context, qr queryer) error
- func (obj *Post) Find(ctx context.Context, qr queryer) error
- func (obj Post) JSONAPISerialize() (string, error)
- func (obj *Post) Save(ctx context.Context, qr queryer) error
- func (obj *Post) Scan(rows scanner) error
- func (obj Post) ToJSONAPIResource() (jsonapi.Resource, jsonapi.Resources)
- type PrimaryKeyMissingError
- type User
- func (obj *User) Assign(v User)
- func (obj User) Columns() []string
- func (obj *User) Destroy(ctx context.Context, qr queryer) error
- func (obj *User) Find(ctx context.Context, qr queryer) error
- func (obj User) JSONAPISerialize() (string, error)
- func (obj *User) Save(ctx context.Context, qr queryer) error
- func (obj *User) Scan(rows scanner) error
- func (obj User) ToJSONAPIResource() (jsonapi.Resource, jsonapi.Resources)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = NotFoundError{}
View Source
var ErrPrimaryKeyMissing = PrimaryKeyMissingError{}
Functions ¶
This section is empty.
Types ¶
type NotFoundError ¶
type NotFoundError struct{}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type Post ¶
type Post struct { schema.Schema // db related fields ID uuid.UUID UserID uuid.UUID Title string Body string Status string CreatedAt time.Time UpdatedAt time.Time // non-db related fields User User }
func NewPostWith ¶
func (Post) JSONAPISerialize ¶
type PrimaryKeyMissingError ¶
type PrimaryKeyMissingError struct{}
func (PrimaryKeyMissingError) Error ¶
func (e PrimaryKeyMissingError) Error() string
Click to show internal directories.
Click to hide internal directories.