Documentation
¶
Index ¶
- Variables
- func AddChannelHook(hookPoint boil.HookPoint, channelHook ChannelHook)
- func AddMessageHook(hookPoint boil.HookPoint, messageHook MessageHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func ChannelExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Channels(mods ...qm.QueryMod) channelQuery
- func MessageExists(ctx context.Context, exec boil.ContextExecutor, timestamp string) (bool, error)
- func Messages(mods ...qm.QueryMod) messageQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Channel
- func (o *Channel) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Channel) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Channel) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Channel) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type ChannelHook
- type ChannelSlice
- type M
- type Message
- func (o *Message) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Message) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Message) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Message) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type MessageHook
- type MessageSlice
- type User
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var ChannelColumns = struct { ID string IsOpen string LastRead string UnreadCount string UnreadCountDisplay string IsGroup string IsShared string IsIm string IsExtShared string IsOrgShared string IsPendingExtShared string IsPrivate string IsMpim string Unlinked string NameNormalized string NumMembers string User string Name string Creator string IsArchived string Topic string Purpose string IsChannel string IsGeneral string IsMember string Locale string CreatedAt string }{ ID: "id", IsOpen: "is_open", LastRead: "last_read", UnreadCount: "unread_count", UnreadCountDisplay: "unread_count_display", IsGroup: "is_group", IsShared: "is_shared", IsIm: "is_im", IsExtShared: "is_ext_shared", IsOrgShared: "is_org_shared", IsPendingExtShared: "is_pending_ext_shared", IsPrivate: "is_private", IsMpim: "is_mpim", Unlinked: "unlinked", NameNormalized: "name_normalized", NumMembers: "num_members", User: "user", Name: "name", Creator: "creator", IsArchived: "is_archived", Topic: "topic", Purpose: "purpose", IsChannel: "is_channel", IsGeneral: "is_general", IsMember: "is_member", Locale: "locale", CreatedAt: "created_at", }
var ChannelRels = struct {
}{}
ChannelRels is where relationship names are stored.
var ChannelWhere = struct { ID whereHelperstring IsOpen whereHelperbool LastRead whereHelperstring UnreadCount whereHelperint64 UnreadCountDisplay whereHelperint64 IsGroup whereHelperbool IsShared whereHelperbool IsIm whereHelperbool IsExtShared whereHelperbool IsOrgShared whereHelperbool IsPendingExtShared whereHelperbool IsPrivate whereHelperbool IsMpim whereHelperbool Unlinked whereHelperint64 NameNormalized whereHelperstring NumMembers whereHelperint64 User whereHelperstring Name whereHelperstring Creator whereHelperstring IsArchived whereHelperbool Topic whereHelperstring Purpose whereHelperstring IsChannel whereHelperbool IsGeneral whereHelperbool IsMember whereHelperbool Locale whereHelperstring CreatedAt whereHelpertime_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, IsOpen: whereHelperbool{/* contains filtered or unexported fields */}, LastRead: whereHelperstring{/* contains filtered or unexported fields */}, UnreadCount: whereHelperint64{/* contains filtered or unexported fields */}, UnreadCountDisplay: whereHelperint64{/* contains filtered or unexported fields */}, IsGroup: whereHelperbool{/* contains filtered or unexported fields */}, IsShared: whereHelperbool{/* contains filtered or unexported fields */}, IsIm: whereHelperbool{/* contains filtered or unexported fields */}, IsExtShared: whereHelperbool{/* contains filtered or unexported fields */}, IsOrgShared: whereHelperbool{/* contains filtered or unexported fields */}, IsPendingExtShared: whereHelperbool{/* contains filtered or unexported fields */}, IsPrivate: whereHelperbool{/* contains filtered or unexported fields */}, IsMpim: whereHelperbool{/* contains filtered or unexported fields */}, Unlinked: whereHelperint64{/* contains filtered or unexported fields */}, NameNormalized: whereHelperstring{/* contains filtered or unexported fields */}, NumMembers: whereHelperint64{/* contains filtered or unexported fields */}, User: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Creator: whereHelperstring{/* contains filtered or unexported fields */}, IsArchived: whereHelperbool{/* contains filtered or unexported fields */}, Topic: whereHelperstring{/* contains filtered or unexported fields */}, Purpose: whereHelperstring{/* contains filtered or unexported fields */}, IsChannel: whereHelperbool{/* contains filtered or unexported fields */}, IsGeneral: whereHelperbool{/* contains filtered or unexported fields */}, IsMember: whereHelperbool{/* contains filtered or unexported fields */}, Locale: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var MessageColumns = struct { Type string Channel string User string Text string Timestamp string ThreadTimestamp string IsStarred string LastRead string Subscribed string UnreadCount string SubType string Hidden string DeletedTimestamp string EventTimestamp string BotID string Name string ReplyCount string CreatedAt string }{ Type: "type", Channel: "channel", User: "user", Text: "text", Timestamp: "timestamp", ThreadTimestamp: "thread_timestamp", IsStarred: "is_starred", LastRead: "last_read", Subscribed: "subscribed", UnreadCount: "unread_count", SubType: "sub_type", Hidden: "hidden", DeletedTimestamp: "deleted_timestamp", EventTimestamp: "event_timestamp", BotID: "bot_id", Name: "name", ReplyCount: "reply_count", CreatedAt: "created_at", }
var MessageRels = struct {
}{}
MessageRels is where relationship names are stored.
var MessageWhere = struct { Type whereHelperstring Channel whereHelperstring User whereHelperstring Text whereHelperstring Timestamp whereHelperstring ThreadTimestamp whereHelperstring IsStarred whereHelperbool LastRead whereHelperstring Subscribed whereHelperbool UnreadCount whereHelperint64 SubType whereHelperstring Hidden whereHelperbool DeletedTimestamp whereHelperstring EventTimestamp whereHelperstring BotID whereHelperstring Name whereHelperstring ReplyCount whereHelperint64 CreatedAt whereHelpertime_Time }{ Type: whereHelperstring{/* contains filtered or unexported fields */}, Channel: whereHelperstring{/* contains filtered or unexported fields */}, User: whereHelperstring{/* contains filtered or unexported fields */}, Text: whereHelperstring{/* contains filtered or unexported fields */}, Timestamp: whereHelperstring{/* contains filtered or unexported fields */}, ThreadTimestamp: whereHelperstring{/* contains filtered or unexported fields */}, IsStarred: whereHelperbool{/* contains filtered or unexported fields */}, LastRead: whereHelperstring{/* contains filtered or unexported fields */}, Subscribed: whereHelperbool{/* contains filtered or unexported fields */}, UnreadCount: whereHelperint64{/* contains filtered or unexported fields */}, SubType: whereHelperstring{/* contains filtered or unexported fields */}, Hidden: whereHelperbool{/* contains filtered or unexported fields */}, DeletedTimestamp: whereHelperstring{/* contains filtered or unexported fields */}, EventTimestamp: whereHelperstring{/* contains filtered or unexported fields */}, BotID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, ReplyCount: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Channels string Messages string Users string }{ Channels: "channels", Messages: "messages", Users: "users", }
var UserColumns = struct { ID string TeamID string Name string Deleted string Color string RealName string TZ string TZLabel string TZOffset string CreatedAt string }{ ID: "id", TeamID: "team_id", Name: "name", Deleted: "deleted", Color: "color", RealName: "real_name", TZ: "tz", TZLabel: "tz_label", TZOffset: "tz_offset", CreatedAt: "created_at", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperstring TeamID whereHelperstring Name whereHelperstring Deleted whereHelperbool Color whereHelperstring RealName whereHelperstring TZ whereHelperstring TZLabel whereHelperstring TZOffset whereHelperint64 CreatedAt whereHelpertime_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, TeamID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Deleted: whereHelperbool{/* contains filtered or unexported fields */}, Color: whereHelperstring{/* contains filtered or unexported fields */}, RealName: whereHelperstring{/* contains filtered or unexported fields */}, TZ: whereHelperstring{/* contains filtered or unexported fields */}, TZLabel: whereHelperstring{/* contains filtered or unexported fields */}, TZOffset: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddChannelHook ¶
func AddChannelHook(hookPoint boil.HookPoint, channelHook ChannelHook)
AddChannelHook registers your hook function for all future operations.
func AddMessageHook ¶
func AddMessageHook(hookPoint boil.HookPoint, messageHook MessageHook)
AddMessageHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func ChannelExists ¶
ChannelExists checks if the Channel row exists.
func MessageExists ¶
MessageExists checks if the Message row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Channel ¶
type Channel struct {
ID string `boil:"id" json:"id" toml:"id" yaml:"id"`
IsOpen bool `boil:"is_open" json:"is_open" toml:"is_open" yaml:"is_open"`
LastRead string `boil:"last_read" json:"last_read" toml:"last_read" yaml:"last_read"`
UnreadCount int64 `boil:"unread_count" json:"unread_count" toml:"unread_count" yaml:"unread_count"`
UnreadCountDisplay int64 `boil:"unread_count_display" json:"unread_count_display" toml:"unread_count_display" yaml:"unread_count_display"`
IsGroup bool `boil:"is_group" json:"is_group" toml:"is_group" yaml:"is_group"`
IsIm bool `boil:"is_im" json:"is_im" toml:"is_im" yaml:"is_im"`
IsPrivate bool `boil:"is_private" json:"is_private" toml:"is_private" yaml:"is_private"`
IsMpim bool `boil:"is_mpim" json:"is_mpim" toml:"is_mpim" yaml:"is_mpim"`
Unlinked int64 `boil:"unlinked" json:"unlinked" toml:"unlinked" yaml:"unlinked"`
NameNormalized string `boil:"name_normalized" json:"name_normalized" toml:"name_normalized" yaml:"name_normalized"`
NumMembers int64 `boil:"num_members" json:"num_members" toml:"num_members" yaml:"num_members"`
User string `boil:"user" json:"user" toml:"user" yaml:"user"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
Creator string `boil:"creator" json:"creator" toml:"creator" yaml:"creator"`
IsArchived bool `boil:"is_archived" json:"is_archived" toml:"is_archived" yaml:"is_archived"`
Topic string `boil:"topic" json:"topic" toml:"topic" yaml:"topic"`
Purpose string `boil:"purpose" json:"purpose" toml:"purpose" yaml:"purpose"`
IsChannel bool `boil:"is_channel" json:"is_channel" toml:"is_channel" yaml:"is_channel"`
IsGeneral bool `boil:"is_general" json:"is_general" toml:"is_general" yaml:"is_general"`
IsMember bool `boil:"is_member" json:"is_member" toml:"is_member" yaml:"is_member"`
Locale string `boil:"locale" json:"locale" toml:"locale" yaml:"locale"`
CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
R *channelR `boil:"-" json:"-" toml:"-" yaml:"-"`
L channelL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Channel is an object representing the database table.
func FindChannel ¶
func FindChannel(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Channel, error)
FindChannel retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Channel) Delete ¶
Delete deletes a single Channel record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Channel) Insert ¶
func (o *Channel) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Channel) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Channel) Update ¶
func (o *Channel) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Channel. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
type ChannelHook ¶
ChannelHook is the signature for custom Channel hook methods
type ChannelSlice ¶
type ChannelSlice []*Channel
ChannelSlice is an alias for a slice of pointers to Channel. This should generally be used opposed to []Channel.
func (ChannelSlice) DeleteAll ¶
func (o ChannelSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ChannelSlice) ReloadAll ¶
func (o *ChannelSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ChannelSlice) UpdateAll ¶
func (o ChannelSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Message ¶
type Message struct {
Type string `boil:"type" json:"type" toml:"type" yaml:"type"`
Channel string `boil:"channel" json:"channel" toml:"channel" yaml:"channel"`
User string `boil:"user" json:"user" toml:"user" yaml:"user"`
Text string `boil:"text" json:"text" toml:"text" yaml:"text"`
Timestamp string `boil:"timestamp" json:"timestamp" toml:"timestamp" yaml:"timestamp"`
ThreadTimestamp string `boil:"thread_timestamp" json:"thread_timestamp" toml:"thread_timestamp" yaml:"thread_timestamp"`
IsStarred bool `boil:"is_starred" json:"is_starred" toml:"is_starred" yaml:"is_starred"`
LastRead string `boil:"last_read" json:"last_read" toml:"last_read" yaml:"last_read"`
Subscribed bool `boil:"subscribed" json:"subscribed" toml:"subscribed" yaml:"subscribed"`
UnreadCount int64 `boil:"unread_count" json:"unread_count" toml:"unread_count" yaml:"unread_count"`
SubType string `boil:"sub_type" json:"sub_type" toml:"sub_type" yaml:"sub_type"`
Hidden bool `boil:"hidden" json:"hidden" toml:"hidden" yaml:"hidden"`
DeletedTimestamp string `boil:"deleted_timestamp" json:"deleted_timestamp" toml:"deleted_timestamp" yaml:"deleted_timestamp"`
EventTimestamp string `boil:"event_timestamp" json:"event_timestamp" toml:"event_timestamp" yaml:"event_timestamp"`
BotID string `boil:"bot_id" json:"bot_id" toml:"bot_id" yaml:"bot_id"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
ReplyCount int64 `boil:"reply_count" json:"reply_count" toml:"reply_count" yaml:"reply_count"`
CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
R *messageR `boil:"-" json:"-" toml:"-" yaml:"-"`
L messageL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Message is an object representing the database table.
func FindMessage ¶
func FindMessage(ctx context.Context, exec boil.ContextExecutor, timestamp string, selectCols ...string) (*Message, error)
FindMessage retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Message) Delete ¶
Delete deletes a single Message record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Message) Insert ¶
func (o *Message) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Message) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Message) Update ¶
func (o *Message) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Message. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
type MessageHook ¶
MessageHook is the signature for custom Message hook methods
type MessageSlice ¶
type MessageSlice []*Message
MessageSlice is an alias for a slice of pointers to Message. This should generally be used opposed to []Message.
func (MessageSlice) DeleteAll ¶
func (o MessageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MessageSlice) ReloadAll ¶
func (o *MessageSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (MessageSlice) UpdateAll ¶
func (o MessageSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type User ¶
type User struct {
ID string `boil:"id" json:"id" toml:"id" yaml:"id"`
TeamID string `boil:"team_id" json:"team_id" toml:"team_id" yaml:"team_id"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
Deleted bool `boil:"deleted" json:"deleted" toml:"deleted" yaml:"deleted"`
Color string `boil:"color" json:"color" toml:"color" yaml:"color"`
RealName string `boil:"real_name" json:"real_name" toml:"real_name" yaml:"real_name"`
TZ string `boil:"tz" json:"tz" toml:"tz" yaml:"tz"`
TZLabel string `boil:"tz_label" json:"tz_label" toml:"tz_label" yaml:"tz_label"`
TZOffset int64 `boil:"tz_offset" json:"tz_offset" toml:"tz_offset" yaml:"tz_offset"`
CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
L userL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
User is an object representing the database table.
func FindUser ¶
func FindUser(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*User, error)
FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*User) Delete ¶
Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.
func (*User) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) Update ¶
func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
type UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.