entities

package
v0.0.0-...-d75abfd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

generated by forge -type=ExampleType; DO NOT EDIT

Index

Constants

This section is empty.

Variables

View Source
var ErrExampleTypeInvalid = errors.New("ExampleType is invalid")

Functions

This section is empty.

Types

type BuzzFeed

type BuzzFeed struct {
	ID          int64       `db:"id" json:"id"`
	Name        string      `db:"name" json:"name"`
	BuzzType    ExampleType `db:"buzz_type" json:"buzzType"`
	Description string      `db:"description" json:"description"`
	Details     Feed        `db:"details" json:"details"`
	CreatedAt   int64       `db:"created_at" json:"createdAt"`
	UpdatedAt   int64       `db:"updated_at" json:"updatedAt"`
}

FIXME: go:generate forge model --type BuzzFeed --tmpl ./db/q.tmpl --suffix _q

type CustomDocument

type CustomDocument struct {
	Id         int64  `json:"id"`
	FirstName  string `json:"firstName"`
	SecondName string `json:"secondName"`
	cdb.Document
}

type ExampleType

type ExampleType int

func (ExampleType) MarshalJSON

func (r ExampleType) MarshalJSON() ([]byte, error)

MarshalJSON is generated so ExampleType satisfies json.Marshaler.

func (*ExampleType) Scan

func (r *ExampleType) Scan(src interface{}) error

Value is generated so ExampleType satisfies db row driver.Scanner.

func (ExampleType) String

func (r ExampleType) String() string

String is generated so ExampleType satisfies fmt.Stringer.

func (*ExampleType) UnmarshalJSON

func (r *ExampleType) UnmarshalJSON(data []byte) error

UnmarshalJSON is generated so ExampleType satisfies json.Unmarshaler.

func (ExampleType) Validate

func (r ExampleType) Validate() error

Validate verifies that value is predefined for ExampleType.

func (ExampleType) Value

func (r ExampleType) Value() (driver.Value, error)

Value is generated so ExampleType satisfies db row driver.Valuer.

type Feed

type Feed struct {
}

func (Feed) MarshalJSON

func (f Feed) MarshalJSON() ([]byte, error)

func (*Feed) Scan

func (f *Feed) Scan(src interface{}) error

func (*Feed) UnmarshalJSON

func (f *Feed) UnmarshalJSON(data []byte) error

func (Feed) Value

func (f Feed) Value() (driver.Value, error)

type Story

type Story struct {
	Id       int64
	Title    string
	AuthorId int64
	Author   *User
}

func (Story) String

func (s Story) String() string

type User

type User struct {
	Id     int64
	Name   string
	Emails []string
}

func (User) String

func (u User) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL