Documentation ¶
Overview ¶
Package infra contains the types for schema 'accountdb'.
Package infra contains the types for schema 'accountdb'.
Package infra contains the types for schema 'accountdb'.
Package infra contains the types for schema 'accountdb'.
Package infra contains the types for schema 'accountdb'.
Index ¶
- Constants
- Variables
- type Execer
- type Executor
- type GoogleAuth
- func GetAllGoogleAuths(ctx context.Context, db Queryer) ([]*GoogleAuth, error)
- func GetGoogleAuth(ctx context.Context, db Queryer, key string) (*GoogleAuth, error)
- func GetGoogleAuths(ctx context.Context, db Queryer, keys []string) ([]*GoogleAuth, error)
- func GoogleAuthByGoogleID(ctx context.Context, db Queryer, googleID string) (*GoogleAuth, error)
- func GoogleAuthByUserID(ctx context.Context, db Queryer, userID string) (*GoogleAuth, error)
- func (ga *GoogleAuth) Delete(ctx context.Context, db Execer) error
- func (ga *GoogleAuth) Deleted() bool
- func (ga *GoogleAuth) Exists() bool
- func (ga *GoogleAuth) Insert(ctx context.Context, db Execer) error
- func (ga *GoogleAuth) InsertIfNotExist(ctx context.Context, db Executor) error
- func (ga *GoogleAuth) InsertOrUpdate(ctx context.Context, db Executor) error
- func (ga *GoogleAuth) Update(ctx context.Context, db Execer) error
- func (ga *GoogleAuth) User(ctx context.Context, db Executor) (*User, error)
- type PubsubEvent
- func GetAllPubsubEvents(ctx context.Context, db Queryer) ([]*PubsubEvent, error)
- func GetPubsubEvent(ctx context.Context, db Queryer, key string) (*PubsubEvent, error)
- func GetPubsubEvents(ctx context.Context, db Queryer, keys []string) ([]*PubsubEvent, error)
- func PubsubEventByID(ctx context.Context, db Queryer, id string) (*PubsubEvent, error)
- func PubsubEventsByIsPublished(ctx context.Context, db Queryer, isPublished bool) ([]*PubsubEvent, error)
- func (pe *PubsubEvent) Delete(ctx context.Context, db Execer) error
- func (pe *PubsubEvent) Deleted() bool
- func (pe *PubsubEvent) Exists() bool
- func (pe *PubsubEvent) Insert(ctx context.Context, db Execer) error
- func (pe *PubsubEvent) InsertIfNotExist(ctx context.Context, db Executor) error
- func (pe *PubsubEvent) InsertOrUpdate(ctx context.Context, db Executor) error
- func (pe *PubsubEvent) Update(ctx context.Context, db Execer) error
- type Queryer
- type ScannerValuer
- type Slice
- type StringSlice
- type User
- func (u *User) Delete(ctx context.Context, db Execer) error
- func (u *User) Deleted() bool
- func (u *User) Exists() bool
- func (u *User) Insert(ctx context.Context, db Execer) error
- func (u *User) InsertIfNotExist(ctx context.Context, db Executor) error
- func (u *User) InsertOrUpdate(ctx context.Context, db Executor) error
- func (u *User) Update(ctx context.Context, db Execer) error
- type UserProfile
- func GetAllUserProfiles(ctx context.Context, db Queryer) ([]*UserProfile, error)
- func GetUserProfile(ctx context.Context, db Queryer, key string) (*UserProfile, error)
- func GetUserProfiles(ctx context.Context, db Queryer, keys []string) ([]*UserProfile, error)
- func UserProfileByEmail(ctx context.Context, db Queryer, email string) (*UserProfile, error)
- func UserProfileByUserID(ctx context.Context, db Queryer, userID string) (*UserProfile, error)
- func (up *UserProfile) Delete(ctx context.Context, db Execer) error
- func (up *UserProfile) Deleted() bool
- func (up *UserProfile) Exists() bool
- func (up *UserProfile) Insert(ctx context.Context, db Execer) error
- func (up *UserProfile) InsertIfNotExist(ctx context.Context, db Executor) error
- func (up *UserProfile) InsertOrUpdate(ctx context.Context, db Executor) error
- func (up *UserProfile) Update(ctx context.Context, db Execer) error
- func (up *UserProfile) User(ctx context.Context, db Executor) (*User, error)
Constants ¶
const ( // Exec operation for like sql.DB.Exec() Exec operation = 1 // Query operation for sql.DB.Query() Query operation = 2 )
Variables ¶
var XOLog = func(ctx context.Context, sqlstr string, params ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
Executor is the common interface for database operations that can be used with types from schema 'accountdb'.
This should work with database/sql.DB and database/sql.Tx.
type GoogleAuth ¶
type GoogleAuth struct { UserID string `db:"user_id"` // user_id GoogleID string `db:"google_id"` // google_id CreatedAt time.Time `db:"created_at"` // created_at UpdatedAt time.Time `db:"updated_at"` // updated_at // contains filtered or unexported fields }
GoogleAuth represents a row from 'google_auth'.
func GetAllGoogleAuths ¶
func GetAllGoogleAuths(ctx context.Context, db Queryer) ([]*GoogleAuth, error)
GetAllGoogleAuths gets all GoogleAuths
func GetGoogleAuth ¶
GetGoogleAuth gets a GoogleAuth by primary key
func GetGoogleAuths ¶
GetGoogleAuths gets GoogleAuth list by primary keys
func GoogleAuthByGoogleID ¶
GoogleAuthByGoogleID retrieves a row from 'google_auth' as a GoogleAuth. Generated from index 'google_id'.
func GoogleAuthByUserID ¶
GoogleAuthByUserID retrieves a row from 'google_auth' as a GoogleAuth. Generated from index 'google_auth_user_id_pkey'.
func (*GoogleAuth) Delete ¶
func (ga *GoogleAuth) Delete(ctx context.Context, db Execer) error
Delete deletes the GoogleAuth from the database.
func (*GoogleAuth) Deleted ¶
func (ga *GoogleAuth) Deleted() bool
Deleted provides information if the GoogleAuth has been deleted from the database.
func (*GoogleAuth) Exists ¶
func (ga *GoogleAuth) Exists() bool
Exists determines if the GoogleAuth exists in the database.
func (*GoogleAuth) Insert ¶
func (ga *GoogleAuth) Insert(ctx context.Context, db Execer) error
Insert inserts the GoogleAuth to the database.
func (*GoogleAuth) InsertIfNotExist ¶
func (ga *GoogleAuth) InsertIfNotExist(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the GoogleAuth to the database.
func (*GoogleAuth) InsertOrUpdate ¶
func (ga *GoogleAuth) InsertOrUpdate(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the GoogleAuth to the database.
type PubsubEvent ¶
type PubsubEvent struct { ID string `db:"id"` // id DeduplicateKey sql.NullString `db:"deduplicate_key"` // deduplicate_key Topic string `db:"topic"` // topic Data string `db:"data"` // data IsPublished bool `db:"is_published"` // is_published PublishedAt mysql.NullTime `db:"published_at"` // published_at CreatedAt time.Time `db:"created_at"` // created_at // contains filtered or unexported fields }
PubsubEvent represents a row from 'pubsub_events'.
func GetAllPubsubEvents ¶
func GetAllPubsubEvents(ctx context.Context, db Queryer) ([]*PubsubEvent, error)
GetAllPubsubEvents gets all PubsubEvents
func GetPubsubEvent ¶
GetPubsubEvent gets a PubsubEvent by primary key
func GetPubsubEvents ¶
GetPubsubEvents gets PubsubEvent list by primary keys
func PubsubEventByID ¶
PubsubEventByID retrieves a row from 'pubsub_events' as a PubsubEvent. Generated from index 'pubsub_events_id_pkey'.
func PubsubEventsByIsPublished ¶
func PubsubEventsByIsPublished(ctx context.Context, db Queryer, isPublished bool) ([]*PubsubEvent, error)
PubsubEventsByIsPublished retrieves a row from 'pubsub_events' as a PubsubEvent. Generated from index 'is_published_idx'.
func (*PubsubEvent) Delete ¶
func (pe *PubsubEvent) Delete(ctx context.Context, db Execer) error
Delete deletes the PubsubEvent from the database.
func (*PubsubEvent) Deleted ¶
func (pe *PubsubEvent) Deleted() bool
Deleted provides information if the PubsubEvent has been deleted from the database.
func (*PubsubEvent) Exists ¶
func (pe *PubsubEvent) Exists() bool
Exists determines if the PubsubEvent exists in the database.
func (*PubsubEvent) Insert ¶
func (pe *PubsubEvent) Insert(ctx context.Context, db Execer) error
Insert inserts the PubsubEvent to the database.
func (*PubsubEvent) InsertIfNotExist ¶
func (pe *PubsubEvent) InsertIfNotExist(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the PubsubEvent to the database.
func (*PubsubEvent) InsertOrUpdate ¶
func (pe *PubsubEvent) InsertOrUpdate(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the PubsubEvent to the database.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type User ¶
type User struct { ID string `db:"id"` // id CreatedAt time.Time `db:"created_at"` // created_at UpdatedAt time.Time `db:"updated_at"` // updated_at // contains filtered or unexported fields }
User represents a row from 'users'.
func GetAllUsers ¶
GetAllUsers gets all Users
func UserByID ¶
UserByID retrieves a row from 'users' as a User. Generated from index 'users_id_pkey'.
func (*User) InsertIfNotExist ¶
InsertOrUpdate inserts or updates the User to the database.
func (*User) InsertOrUpdate ¶
InsertOrUpdate inserts or updates the User to the database.
type UserProfile ¶
type UserProfile struct { UserID string `db:"user_id"` // user_id Email string `db:"email"` // email DisplayName string `db:"display_name"` // display_name ScreenImgURL sql.NullString `db:"screen_img_url"` // screen_img_url CreatedAt time.Time `db:"created_at"` // created_at UpdatedAt time.Time `db:"updated_at"` // updated_at // contains filtered or unexported fields }
UserProfile represents a row from 'user_profiles'.
func GetAllUserProfiles ¶
func GetAllUserProfiles(ctx context.Context, db Queryer) ([]*UserProfile, error)
GetAllUserProfiles gets all UserProfiles
func GetUserProfile ¶
GetUserProfile gets a UserProfile by primary key
func GetUserProfiles ¶
GetUserProfiles gets UserProfile list by primary keys
func UserProfileByEmail ¶
UserProfileByEmail retrieves a row from 'user_profiles' as a UserProfile. Generated from index 'email'.
func UserProfileByUserID ¶
UserProfileByUserID retrieves a row from 'user_profiles' as a UserProfile. Generated from index 'user_profiles_user_id_pkey'.
func (*UserProfile) Delete ¶
func (up *UserProfile) Delete(ctx context.Context, db Execer) error
Delete deletes the UserProfile from the database.
func (*UserProfile) Deleted ¶
func (up *UserProfile) Deleted() bool
Deleted provides information if the UserProfile has been deleted from the database.
func (*UserProfile) Exists ¶
func (up *UserProfile) Exists() bool
Exists determines if the UserProfile exists in the database.
func (*UserProfile) Insert ¶
func (up *UserProfile) Insert(ctx context.Context, db Execer) error
Insert inserts the UserProfile to the database.
func (*UserProfile) InsertIfNotExist ¶
func (up *UserProfile) InsertIfNotExist(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the UserProfile to the database.
func (*UserProfile) InsertOrUpdate ¶
func (up *UserProfile) InsertOrUpdate(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the UserProfile to the database.