entities

package
v0.0.0-...-3852566 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package entities is a generated protocol buffer package.

It is generated from these files:

service/language/proto/entities/entities.proto

It has these top-level messages:

Skill
Word
Language

Index

Constants

This section is empty.

Variables

View Source
var File_service_language_proto_entities_entities_proto protoreflect.FileDescriptor

Functions

func DefaultDeleteLanguage

func DefaultDeleteLanguage(ctx context.Context, in *Language, db *gorm1.DB) error

func DefaultDeleteLanguageSet

func DefaultDeleteLanguageSet(ctx context.Context, in []*Language, db *gorm1.DB) error

func DefaultDeleteSkill

func DefaultDeleteSkill(ctx context.Context, in *Skill, db *gorm1.DB) error

func DefaultDeleteSkillSet

func DefaultDeleteSkillSet(ctx context.Context, in []*Skill, db *gorm1.DB) error

func DefaultDeleteWord

func DefaultDeleteWord(ctx context.Context, in *Word, db *gorm1.DB) error

func DefaultDeleteWordSet

func DefaultDeleteWordSet(ctx context.Context, in []*Word, db *gorm1.DB) error

Types

type Language

type Language struct {
	Id           *types.UUID          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // primary key
	CreatedAt    *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt    *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt    *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	Name         string               `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Abbreviation string               `protobuf:"bytes,6,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"`
	FlagSrc      string               `protobuf:"bytes,7,opt,name=flag_src,json=flagSrc,proto3" json:"flag_src,omitempty"`
	Skills       []*Skill             `protobuf:"bytes,9,rep,name=skills,proto3" json:"skills,omitempty"`
	// contains filtered or unexported fields
}

Language Entity

func DefaultApplyFieldMaskLanguage

func DefaultApplyFieldMaskLanguage(ctx context.Context, patchee *Language, patcher *Language, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Language, error)

DefaultApplyFieldMaskLanguage patches an pbObject with patcher according to a field mask.

func DefaultCreateLanguage

func DefaultCreateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)

DefaultCreateLanguage executes a basic gorm create call

func DefaultListLanguage

func DefaultListLanguage(ctx context.Context, db *gorm1.DB) ([]*Language, error)

DefaultListLanguage executes a gorm list call

func DefaultPatchLanguage

func DefaultPatchLanguage(ctx context.Context, in *Language, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Language, error)

DefaultPatchLanguage executes a basic gorm update call with patch behavior

func DefaultPatchSetLanguage

func DefaultPatchSetLanguage(ctx context.Context, objects []*Language, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Language, error)

DefaultPatchSetLanguage executes a bulk gorm update call with patch behavior

func DefaultReadLanguage

func DefaultReadLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)

DefaultReadLanguage executes a basic gorm read call

func DefaultStrictUpdateLanguage

func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)

DefaultStrictUpdateLanguage clears first level 1:many children and then executes a gorm update call

func (*Language) Descriptor deprecated

func (*Language) Descriptor() ([]byte, []int)

Deprecated: Use Language.ProtoReflect.Descriptor instead.

func (*Language) GetAbbreviation

func (x *Language) GetAbbreviation() string

func (*Language) GetCreatedAt

func (x *Language) GetCreatedAt() *timestamp.Timestamp

func (*Language) GetDeletedAt

func (x *Language) GetDeletedAt() *timestamp.Timestamp

func (*Language) GetFlagSrc

func (x *Language) GetFlagSrc() string

func (*Language) GetId

func (x *Language) GetId() *types.UUID

func (*Language) GetName

func (x *Language) GetName() string

func (*Language) GetSkills

func (x *Language) GetSkills() []*Skill

func (*Language) GetUpdatedAt

func (x *Language) GetUpdatedAt() *timestamp.Timestamp

func (*Language) ProtoMessage

func (*Language) ProtoMessage()

func (*Language) ProtoReflect

func (x *Language) ProtoReflect() protoreflect.Message

func (*Language) Reset

func (x *Language) Reset()

func (*Language) String

func (x *Language) String() string

func (*Language) ToORM

func (m *Language) ToORM(ctx context.Context) (LanguageORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Language) Validate

func (m *Language) Validate() error

Validate is disabled for Language. This method will always return nil.

type LanguageORM

type LanguageORM struct {
	Abbreviation string        `gorm:"size:10;not null"`
	CreatedAt    *time.Time    `gorm:"not null"`
	DeletedAt    *time.Time    `gorm:"index:idx_languages_deleted_at"`
	FlagSrc      string        `gorm:"size:255;not null"`
	Id           go_uuid1.UUID `gorm:"type:uuid;primary_key;unique;not null"`
	Name         string        `gorm:"size:100;not null"`
	Skills       []*SkillORM   `gorm:"foreignkey:LanguageId;association_foreignkey:Id;preload:true"`
	UpdatedAt    *time.Time    `gorm:"not null"`
}

func (*LanguageORM) BeforeCreate

func (m *LanguageORM) BeforeCreate(scope *gorm.Scope) error

BeforeCreate implements the GORM BeforeCreate interface for the UserORM type. you can use this method to generate new UUID for CREATE operation or let database create it with this annotation: {type: "uuid", primary_key: true, not_null:true, default: "uuid_generate_v4()"}]; we prefer First method as it works with both SQLite & PostgreSQL

func (LanguageORM) TableName

func (LanguageORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*LanguageORM) ToPB

func (m *LanguageORM) ToPB(ctx context.Context) (Language, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type LanguageORMWithAfterCreate_

type LanguageORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterDeleteSet

type LanguageORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Language, *gorm1.DB) error
}

type LanguageORMWithAfterDelete_

type LanguageORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterListFind

type LanguageORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]LanguageORM) error
}

type LanguageORMWithAfterReadFind

type LanguageORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterStrictUpdateSave

type LanguageORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type LanguageORMWithBeforeCreate_

type LanguageORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeDeleteSet

type LanguageORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Language, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeDelete_

type LanguageORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeListApplyQuery

type LanguageORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeListFind

type LanguageORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeReadApplyQuery

type LanguageORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeReadFind

type LanguageORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeStrictUpdateCleanup

type LanguageORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeStrictUpdateSave

type LanguageORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageValidationError

type LanguageValidationError struct {
	// contains filtered or unexported fields
}

LanguageValidationError is the validation error returned by Language.Validate if the designated constraints aren't met.

func (LanguageValidationError) Cause

func (e LanguageValidationError) Cause() error

Cause function returns cause value.

func (LanguageValidationError) Error

func (e LanguageValidationError) Error() string

Error satisfies the builtin error interface

func (LanguageValidationError) ErrorName

func (e LanguageValidationError) ErrorName() string

ErrorName returns error name.

func (LanguageValidationError) Field

func (e LanguageValidationError) Field() string

Field function returns field value.

func (LanguageValidationError) Key

func (e LanguageValidationError) Key() bool

Key function returns key value.

func (LanguageValidationError) Reason

func (e LanguageValidationError) Reason() string

Reason function returns reason value.

type LanguageWithAfterPatchSave

type LanguageWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) error
}

type LanguageWithAfterToORM

type LanguageWithAfterToORM interface {
	AfterToORM(context.Context, *LanguageORM) error
}

LanguageAfterToORM called after default ToORM code

type LanguageWithAfterToPB

type LanguageWithAfterToPB interface {
	AfterToPB(context.Context, *Language) error
}

LanguageAfterToPB called after default ToPB code

type LanguageWithBeforePatchApplyFieldMask

type LanguageWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforePatchRead

type LanguageWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforePatchSave

type LanguageWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforeToORM

type LanguageWithBeforeToORM interface {
	BeforeToORM(context.Context, *LanguageORM) error
}

LanguageBeforeToORM called before default ToORM code

type LanguageWithBeforeToPB

type LanguageWithBeforeToPB interface {
	BeforeToPB(context.Context, *Language) error
}

LanguageBeforeToPB called before default ToPB code

type Skill

type Skill struct {
	Id           *types.UUID           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // primary key
	CreatedAt    *timestamp.Timestamp  `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt    *timestamp.Timestamp  `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt    *timestamp.Timestamp  `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	Dependencies *wrappers.StringValue `protobuf:"bytes,5,opt,name=dependencies,proto3" json:"dependencies,omitempty"`
	Disabled     bool                  `protobuf:"varint,6,opt,name=disabled,proto3" json:"disabled,omitempty"`
	LessonNumber int32                 `protobuf:"varint,7,opt,name=lesson_number,json=lessonNumber,proto3" json:"lesson_number,omitempty"`
	Description  *wrappers.StringValue `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	Locked       bool                  `protobuf:"varint,9,opt,name=locked,proto3" json:"locked,omitempty"`
	Type         *wrappers.StringValue `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
	Title        string                `protobuf:"bytes,11,opt,name=title,proto3" json:"title,omitempty"`
	UrlTitle     string                `protobuf:"bytes,12,opt,name=url_title,json=urlTitle,proto3" json:"url_title,omitempty"`
	Category     *wrappers.StringValue `protobuf:"bytes,13,opt,name=category,proto3" json:"category,omitempty"`
	Index        int32                 `protobuf:"varint,14,opt,name=index,proto3" json:"index,omitempty"`
	Words        []*Word               `protobuf:"bytes,15,rep,name=words,proto3" json:"words,omitempty"`
	// contains filtered or unexported fields
}

A skill is a set of lessons focused on a particular topic, such as present tense verbs or sports vocabulary. https://duolingo.fandom.com/wiki/Skill

func DefaultApplyFieldMaskSkill

func DefaultApplyFieldMaskSkill(ctx context.Context, patchee *Skill, patcher *Skill, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Skill, error)

DefaultApplyFieldMaskSkill patches an pbObject with patcher according to a field mask.

func DefaultCreateSkill

func DefaultCreateSkill(ctx context.Context, in *Skill, db *gorm1.DB) (*Skill, error)

DefaultCreateSkill executes a basic gorm create call

func DefaultListSkill

func DefaultListSkill(ctx context.Context, db *gorm1.DB) ([]*Skill, error)

DefaultListSkill executes a gorm list call

func DefaultPatchSetSkill

func DefaultPatchSetSkill(ctx context.Context, objects []*Skill, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Skill, error)

DefaultPatchSetSkill executes a bulk gorm update call with patch behavior

func DefaultPatchSkill

func DefaultPatchSkill(ctx context.Context, in *Skill, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Skill, error)

DefaultPatchSkill executes a basic gorm update call with patch behavior

func DefaultReadSkill

func DefaultReadSkill(ctx context.Context, in *Skill, db *gorm1.DB) (*Skill, error)

DefaultReadSkill executes a basic gorm read call

func DefaultStrictUpdateSkill

func DefaultStrictUpdateSkill(ctx context.Context, in *Skill, db *gorm1.DB) (*Skill, error)

DefaultStrictUpdateSkill clears first level 1:many children and then executes a gorm update call

func (*Skill) Descriptor deprecated

func (*Skill) Descriptor() ([]byte, []int)

Deprecated: Use Skill.ProtoReflect.Descriptor instead.

func (*Skill) GetCategory

func (x *Skill) GetCategory() *wrappers.StringValue

func (*Skill) GetCreatedAt

func (x *Skill) GetCreatedAt() *timestamp.Timestamp

func (*Skill) GetDeletedAt

func (x *Skill) GetDeletedAt() *timestamp.Timestamp

func (*Skill) GetDependencies

func (x *Skill) GetDependencies() *wrappers.StringValue

func (*Skill) GetDescription

func (x *Skill) GetDescription() *wrappers.StringValue

func (*Skill) GetDisabled

func (x *Skill) GetDisabled() bool

func (*Skill) GetId

func (x *Skill) GetId() *types.UUID

func (*Skill) GetIndex

func (x *Skill) GetIndex() int32

func (*Skill) GetLessonNumber

func (x *Skill) GetLessonNumber() int32

func (*Skill) GetLocked

func (x *Skill) GetLocked() bool

func (*Skill) GetTitle

func (x *Skill) GetTitle() string

func (*Skill) GetType

func (x *Skill) GetType() *wrappers.StringValue

func (*Skill) GetUpdatedAt

func (x *Skill) GetUpdatedAt() *timestamp.Timestamp

func (*Skill) GetUrlTitle

func (x *Skill) GetUrlTitle() string

func (*Skill) GetWords

func (x *Skill) GetWords() []*Word

func (*Skill) ProtoMessage

func (*Skill) ProtoMessage()

func (*Skill) ProtoReflect

func (x *Skill) ProtoReflect() protoreflect.Message

func (*Skill) Reset

func (x *Skill) Reset()

func (*Skill) String

func (x *Skill) String() string

func (*Skill) ToORM

func (m *Skill) ToORM(ctx context.Context) (SkillORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Skill) Validate

func (m *Skill) Validate() error

Validate is disabled for Skill. This method will always return nil.

type SkillORM

type SkillORM struct {
	Category     *string    `gorm:"size:100"`
	CreatedAt    *time.Time `gorm:"not null"`
	DeletedAt    *time.Time `gorm:"index:idx_skills_deleted_at"`
	Dependencies *string
	Description  *string
	Disabled     bool
	Id           go_uuid1.UUID `gorm:"type:uuid;primary_key;unique;not null"`
	Index        int32         `gorm:"not null"`
	LanguageId   *go_uuid1.UUID
	LessonNumber int32 `gorm:"not null"`
	Locked       bool
	Title        string `gorm:"size:50;not null"`
	Type         *string
	UpdatedAt    *time.Time `gorm:"not null"`
	UrlTitle     string     `gorm:"size:100;not null"`
	WordId       *go_uuid1.UUID
	Words        []*WordORM `gorm:"foreignkey:SkillId;association_foreignkey:Id;preload:true"`
}

func (*SkillORM) BeforeCreate

func (m *SkillORM) BeforeCreate(scope *gorm.Scope) error

BeforeCreate implements the GORM BeforeCreate interface for the ProfileORM type.

func (SkillORM) TableName

func (SkillORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*SkillORM) ToPB

func (m *SkillORM) ToPB(ctx context.Context) (Skill, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type SkillORMWithAfterCreate_

type SkillORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type SkillORMWithAfterDeleteSet

type SkillORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Skill, *gorm1.DB) error
}

type SkillORMWithAfterDelete_

type SkillORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type SkillORMWithAfterListFind

type SkillORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]SkillORM) error
}

type SkillORMWithAfterReadFind

type SkillORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type SkillORMWithAfterStrictUpdateSave

type SkillORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type SkillORMWithBeforeCreate_

type SkillORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeDeleteSet

type SkillORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Skill, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeDelete_

type SkillORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeListApplyQuery

type SkillORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeListFind

type SkillORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeReadApplyQuery

type SkillORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeReadFind

type SkillORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeStrictUpdateCleanup

type SkillORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillORMWithBeforeStrictUpdateSave

type SkillORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type SkillValidationError

type SkillValidationError struct {
	// contains filtered or unexported fields
}

SkillValidationError is the validation error returned by Skill.Validate if the designated constraints aren't met.

func (SkillValidationError) Cause

func (e SkillValidationError) Cause() error

Cause function returns cause value.

func (SkillValidationError) Error

func (e SkillValidationError) Error() string

Error satisfies the builtin error interface

func (SkillValidationError) ErrorName

func (e SkillValidationError) ErrorName() string

ErrorName returns error name.

func (SkillValidationError) Field

func (e SkillValidationError) Field() string

Field function returns field value.

func (SkillValidationError) Key

func (e SkillValidationError) Key() bool

Key function returns key value.

func (SkillValidationError) Reason

func (e SkillValidationError) Reason() string

Reason function returns reason value.

type SkillWithAfterPatchSave

type SkillWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Skill, *field_mask1.FieldMask, *gorm1.DB) error
}

type SkillWithAfterToORM

type SkillWithAfterToORM interface {
	AfterToORM(context.Context, *SkillORM) error
}

SkillAfterToORM called after default ToORM code

type SkillWithAfterToPB

type SkillWithAfterToPB interface {
	AfterToPB(context.Context, *Skill) error
}

SkillAfterToPB called after default ToPB code

type SkillWithBeforePatchApplyFieldMask

type SkillWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Skill, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type SkillWithBeforePatchRead

type SkillWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Skill, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type SkillWithBeforePatchSave

type SkillWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Skill, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type SkillWithBeforeToORM

type SkillWithBeforeToORM interface {
	BeforeToORM(context.Context, *SkillORM) error
}

SkillBeforeToORM called before default ToORM code

type SkillWithBeforeToPB

type SkillWithBeforeToPB interface {
	BeforeToPB(context.Context, *Skill) error
}

SkillBeforeToPB called before default ToPB code

type Word

type Word struct {
	Id        *types.UUID          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // primary key
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	Content   string               `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
	AudioSrc  string               `protobuf:"bytes,6,opt,name=audio_src,json=audioSrc,proto3" json:"audio_src,omitempty"`
	Skill     *Skill               `protobuf:"bytes,7,opt,name=Skill,proto3" json:"Skill,omitempty"`
	// contains filtered or unexported fields
}

func DefaultApplyFieldMaskWord

func DefaultApplyFieldMaskWord(ctx context.Context, patchee *Word, patcher *Word, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Word, error)

DefaultApplyFieldMaskWord patches an pbObject with patcher according to a field mask.

func DefaultCreateWord

func DefaultCreateWord(ctx context.Context, in *Word, db *gorm1.DB) (*Word, error)

DefaultCreateWord executes a basic gorm create call

func DefaultListWord

func DefaultListWord(ctx context.Context, db *gorm1.DB) ([]*Word, error)

DefaultListWord executes a gorm list call

func DefaultPatchSetWord

func DefaultPatchSetWord(ctx context.Context, objects []*Word, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Word, error)

DefaultPatchSetWord executes a bulk gorm update call with patch behavior

func DefaultPatchWord

func DefaultPatchWord(ctx context.Context, in *Word, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Word, error)

DefaultPatchWord executes a basic gorm update call with patch behavior

func DefaultReadWord

func DefaultReadWord(ctx context.Context, in *Word, db *gorm1.DB) (*Word, error)

DefaultReadWord executes a basic gorm read call

func DefaultStrictUpdateWord

func DefaultStrictUpdateWord(ctx context.Context, in *Word, db *gorm1.DB) (*Word, error)

DefaultStrictUpdateWord clears first level 1:many children and then executes a gorm update call

func (*Word) Descriptor deprecated

func (*Word) Descriptor() ([]byte, []int)

Deprecated: Use Word.ProtoReflect.Descriptor instead.

func (*Word) GetAudioSrc

func (x *Word) GetAudioSrc() string

func (*Word) GetContent

func (x *Word) GetContent() string

func (*Word) GetCreatedAt

func (x *Word) GetCreatedAt() *timestamp.Timestamp

func (*Word) GetDeletedAt

func (x *Word) GetDeletedAt() *timestamp.Timestamp

func (*Word) GetId

func (x *Word) GetId() *types.UUID

func (*Word) GetSkill

func (x *Word) GetSkill() *Skill

func (*Word) GetUpdatedAt

func (x *Word) GetUpdatedAt() *timestamp.Timestamp

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) ProtoReflect

func (x *Word) ProtoReflect() protoreflect.Message

func (*Word) Reset

func (x *Word) Reset()

func (*Word) String

func (x *Word) String() string

func (*Word) ToORM

func (m *Word) ToORM(ctx context.Context) (WordORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Word) Validate

func (m *Word) Validate() error

Validate is disabled for Word. This method will always return nil.

type WordORM

type WordORM struct {
	AudioSrc  string        `gorm:"size:255;not null"`
	Content   string        `gorm:"not null"`
	CreatedAt *time.Time    `gorm:"not null"`
	DeletedAt *time.Time    `gorm:"index:idx_words_deleted_at"`
	Id        go_uuid1.UUID `gorm:"type:uuid;primary_key;unique;not null"`
	Skill     *SkillORM     `gorm:"foreignkey:WordId;association_foreignkey:Id;preload:false"`
	SkillId   *go_uuid1.UUID
	UpdatedAt *time.Time `gorm:"not null"`
}

func (*WordORM) BeforeCreate

func (m *WordORM) BeforeCreate(scope *gorm.Scope) error

BeforeCreate implements the GORM BeforeCreate interface for the ProfileORM type.

func (WordORM) TableName

func (WordORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*WordORM) ToPB

func (m *WordORM) ToPB(ctx context.Context) (Word, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type WordORMWithAfterCreate_

type WordORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type WordORMWithAfterDeleteSet

type WordORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Word, *gorm1.DB) error
}

type WordORMWithAfterDelete_

type WordORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type WordORMWithAfterListFind

type WordORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]WordORM) error
}

type WordORMWithAfterReadFind

type WordORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type WordORMWithAfterStrictUpdateSave

type WordORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type WordORMWithBeforeCreate_

type WordORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeDeleteSet

type WordORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Word, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeDelete_

type WordORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeListApplyQuery

type WordORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeListFind

type WordORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeReadApplyQuery

type WordORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeReadFind

type WordORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeStrictUpdateCleanup

type WordORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordORMWithBeforeStrictUpdateSave

type WordORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type WordValidationError

type WordValidationError struct {
	// contains filtered or unexported fields
}

WordValidationError is the validation error returned by Word.Validate if the designated constraints aren't met.

func (WordValidationError) Cause

func (e WordValidationError) Cause() error

Cause function returns cause value.

func (WordValidationError) Error

func (e WordValidationError) Error() string

Error satisfies the builtin error interface

func (WordValidationError) ErrorName

func (e WordValidationError) ErrorName() string

ErrorName returns error name.

func (WordValidationError) Field

func (e WordValidationError) Field() string

Field function returns field value.

func (WordValidationError) Key

func (e WordValidationError) Key() bool

Key function returns key value.

func (WordValidationError) Reason

func (e WordValidationError) Reason() string

Reason function returns reason value.

type WordWithAfterPatchSave

type WordWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Word, *field_mask1.FieldMask, *gorm1.DB) error
}

type WordWithAfterToORM

type WordWithAfterToORM interface {
	AfterToORM(context.Context, *WordORM) error
}

WordAfterToORM called after default ToORM code

type WordWithAfterToPB

type WordWithAfterToPB interface {
	AfterToPB(context.Context, *Word) error
}

WordAfterToPB called after default ToPB code

type WordWithBeforePatchApplyFieldMask

type WordWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Word, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type WordWithBeforePatchRead

type WordWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Word, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type WordWithBeforePatchSave

type WordWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Word, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type WordWithBeforeToORM

type WordWithBeforeToORM interface {
	BeforeToORM(context.Context, *WordORM) error
}

WordBeforeToORM called before default ToORM code

type WordWithBeforeToPB

type WordWithBeforeToPB interface {
	BeforeToPB(context.Context, *Word) error
}

WordBeforeToPB called before default ToPB code

Jump to

Keyboard shortcuts

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