model

package
v0.0.0-...-d400468 Latest Latest
Warning

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

Go to latest
Published: May 21, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conjugations

type Conjugations struct {
	FirstPersonSingular  *string `json:"first-person-singular" db:"sing_first"`
	SecondPersonSingular *string `json:"second-person-singular" db:"sing_second"`
	ThirdPersonSingular  *string `json:"third-person-singular" db:"sing_third"`
	FirstPersonPlural    *string `json:"first-person-plural" db:"plural_first"`
	SecondPersonPlural   *string `json:"second-person-plural" db:"plural_second"`
	ThirdPersonPlural    *string `json:"third-person-plural" db:"plural_third"`
}

Anonymous conjugations type definition for all verb tenses

type Model

type Model struct {
	ID        uint64     `json:"-" db:"id"`
	CreatedAt *time.Time `json:"created-at" db:"created_at"`
	UpdatedAt *null.Time `json:"updated-at" db:"updated_at"`
}

func (Model) GetID

func (m Model) GetID() string

GetID to satisfy jsonapi.MarshalIdentifier interface

func (*Model) SetID

func (m *Model) SetID(id string) error

SetID to satisfy jsonapi.UnmarshalIdentifier interface

type ModelInterface

type ModelInterface interface {
	GetID() string
	SetID(string) error
}

type Noun

type Noun struct {
	Model
	Singular *string `json:"singular" db:"singular"`
	Plural   *string `json:"plural" db:"plural"`
}

Base noun model type definition

func (Noun) TableName

func (n Noun) TableName() string

type ResultSet

type ResultSet []ModelInterface

type SignupUser

type SignupUser struct {
	Model
	Username *string `json:"username" db:"username"`
	Email    *string `json:"email" db:"email"`
	Password *string `json:"password" db:"password"`
}

type TensePresentIndicative

type TensePresentIndicative struct {
	Model
	VerbId *null.Int `json:"verb" db:"verb_id"`
	Conjugations
	// contains filtered or unexported fields
}

Base tense present indicative model type definition

func NewTensePresentIndicative

func NewTensePresentIndicative(includes map[string]struct{}) TensePresentIndicative

func (TensePresentIndicative) GetReferencedIDs

func (t TensePresentIndicative) GetReferencedIDs() []jsonapi.ReferenceID

GetReferencedIDs to satisfy the jsonapi.MarshalLinkedRelations interface

func (TensePresentIndicative) GetReferencedStructs

func (t TensePresentIndicative) GetReferencedStructs() []jsonapi.MarshalIdentifier

GetReferencedStructs to satisfy the jsonapi.MarhsalIncludedRelations interface

func (TensePresentIndicative) GetReferences

func (t TensePresentIndicative) GetReferences() []jsonapi.Reference

func (TensePresentIndicative) TableName

func (t TensePresentIndicative) TableName() string

type User

type User struct {
	Model
	Username *string `json:"username" db:"username"`
	Email    *string `json:"email" db:"email"`
	Password *string `json:"-" db:"password"`
}

Base noun model type definition

func (User) TableName

func (u User) TableName() string

type Verb

type Verb struct {
	Model
	AuxVerbId      *null.Int `json:"auxiliary-verb" db:"aux_verb_id"`
	Gerund         *string   `json:"gerund" db:"gerund"`
	Infinitive     *string   `json:"infinitive" db:"infinitive" filterComparison:"like"`
	PastParticiple *string   `json:"past-participle" db:"past_participle"`
	Reflexive      *bool     `json:"reflexive" db:"reflexive"`
}

Base verb model type definition

func (Verb) GetReferencedIDs

func (v Verb) GetReferencedIDs() []jsonapi.ReferenceID

GetReferencedIDs to satisfy the jsonapi.MarshalLinkedRelations interface

func (Verb) GetReferencedStructs

func (v Verb) GetReferencedStructs() []jsonapi.MarshalIdentifier

func (Verb) GetReferences

func (v Verb) GetReferences() []jsonapi.Reference

func (Verb) TableName

func (v Verb) TableName() string

Jump to

Keyboard shortcuts

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