Documentation ¶
Overview ¶
Code generated by yo. DO NOT EDIT. Package model contains the types.
Code generated by yo. DO NOT EDIT. Package model contains the types.
Code generated by yo. DO NOT EDIT. Package model contains the types.
Code generated by yo. DO NOT EDIT. Package model contains the types.
Index ¶
- func GroupColumns() []string
- func GroupColumnsByIndexName(index string) []string
- func GroupPrimaryKeys() []string
- func NewUUID() (string, error)
- func UserColumns() []string
- func UserColumnsByIndexName(index string) []string
- func UserGroupColumns() []string
- func UserGroupColumnsByIndexName(index string) []string
- func UserGroupPrimaryKeys() []string
- func UserPrimaryKeys() []string
- type Group
- func (g *Group) ColumnsToPtrs(cols []string) ([]interface{}, error)
- func (g *Group) Delete() *spanner.Mutation
- func (g *Group) Insert() *spanner.Mutation
- func (g *Group) InsertOrUpdate() *spanner.Mutation
- func (g *Group) Ptrs() []interface{}
- func (g *Group) SetIdentity() (err error)
- func (g *Group) Update() *spanner.Mutation
- func (g *Group) UpdateColumns(cols ...string) (*spanner.Mutation, error)
- func (g *Group) UpdateMap(groupMap map[string]interface{}) *spanner.Mutation
- type H
- type User
- func (u *User) ColumnsToPtrs(cols []string) ([]interface{}, error)
- func (u *User) Delete() *spanner.Mutation
- func (u *User) Insert() *spanner.Mutation
- func (u *User) InsertOrUpdate() *spanner.Mutation
- func (u *User) Ptrs() []interface{}
- func (u *User) SetIdentity() (err error)
- func (u *User) Update() *spanner.Mutation
- func (u *User) UpdateColumns(cols ...string) (*spanner.Mutation, error)
- func (u *User) UpdateMap(userMap map[string]interface{}) *spanner.Mutation
- type UserGroup
- func (ug *UserGroup) ColumnsToPtrs(cols []string) ([]interface{}, error)
- func (ug *UserGroup) Delete() *spanner.Mutation
- func (ug *UserGroup) Insert() *spanner.Mutation
- func (ug *UserGroup) InsertOrUpdate() *spanner.Mutation
- func (ug *UserGroup) Ptrs() []interface{}
- func (ug *UserGroup) SetIdentity() (err error)
- func (ug *UserGroup) Update() *spanner.Mutation
- func (ug *UserGroup) UpdateColumns(cols ...string) (*spanner.Mutation, error)
- func (ug *UserGroup) UpdateMap(usergroupMap map[string]interface{}) *spanner.Mutation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupColumns ¶
func GroupColumns() []string
func GroupColumnsByIndexName ¶
func GroupPrimaryKeys ¶
func GroupPrimaryKeys() []string
func UserColumns ¶
func UserColumns() []string
func UserColumnsByIndexName ¶
func UserGroupColumns ¶
func UserGroupColumns() []string
func UserGroupPrimaryKeys ¶
func UserGroupPrimaryKeys() []string
func UserPrimaryKeys ¶
func UserPrimaryKeys() []string
Types ¶
type Group ¶
type Group struct { GroupID string `spanner:"group_id" json:"groupID"` Name string `spanner:"name" json:"name"` CreatedAt time.Time `spanner:"created_at" json:"createdAt"` UpdatedAt time.Time `spanner:"updated_at" json:"updatedAt"` }
Group represents a row from 'groups'.
func (*Group) ColumnsToPtrs ¶
func (*Group) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*Group) InsertOrUpdate ¶
InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.
func (*Group) SetIdentity ¶
func (*Group) Update ¶
Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.
func (*Group) UpdateColumns ¶
UpdateColumns returns a Mutation to update specified columns of a row in a table.
type User ¶
type User struct { UserID string `spanner:"user_id" json:"userID"` Name string `spanner:"name" json:"name"` Status int64 `spanner:"status" json:"status"` CreatedAt time.Time `spanner:"created_at" json:"createdAt"` UpdatedAt time.Time `spanner:"updated_at" json:"updatedAt"` }
User represents a row from 'users'.
func (*User) ColumnsToPtrs ¶
func (*User) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*User) InsertOrUpdate ¶
InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.
func (*User) SetIdentity ¶
func (*User) Update ¶
Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.
func (*User) UpdateColumns ¶
UpdateColumns returns a Mutation to update specified columns of a row in a table.
type UserGroup ¶
type UserGroup struct { GroupID string `spanner:"group_id" json:"groupID"` UserID string `spanner:"user_id" json:"userID"` CreatedAt time.Time `spanner:"created_at" json:"createdAt"` UpdatedAt time.Time `spanner:"updated_at" json:"updatedAt"` }
UserGroup represents a row from 'user_groups'.
func (*UserGroup) ColumnsToPtrs ¶
func (*UserGroup) Insert ¶
Insert returns a Mutation to insert a row into a table. If the row already exists, the write or transaction fails.
func (*UserGroup) InsertOrUpdate ¶
InsertOrUpdate returns a Mutation to insert a row into a table. If the row already exists, it updates it instead. Any column values not explicitly written are preserved.
func (*UserGroup) SetIdentity ¶
func (*UserGroup) Update ¶
Update returns a Mutation to update a row in a table. If the row does not already exist, the write or transaction fails.
func (*UserGroup) UpdateColumns ¶
UpdateColumns returns a Mutation to update specified columns of a row in a table.