Documentation ¶
Index ¶
- type AttendanceMember
- type ConfigTypes
- type CreateAttendanceMemberParams
- type CreateSessionParams
- type CreateStreamParams
- type CreateUserConfigParams
- type CreateUserParams
- type DBTX
- type GetSessionByRefreshTokenRow
- type GetSessionByUserIDRow
- type GetSessionParams
- type GetSessionRow
- type GetStreamAttendanceMembersParams
- type GetStreamAttendanceMembersRow
- type GetStreamParams
- type GetStreamRow
- type GetUserConfigParams
- type GetUserConfigRow
- type GetUserRow
- type ListSessionRow
- type ListStreamsParams
- type ListStreamsRow
- type ListUsersParams
- type NullConfigTypes
- type Querier
- type Queries
- func (q *Queries) CreateAttendanceMember(ctx context.Context, arg CreateAttendanceMemberParams) (AttendanceMember, error)
- func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
- func (q *Queries) CreateStream(ctx context.Context, arg CreateStreamParams) (Stream, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateUserConfig(ctx context.Context, arg CreateUserConfigParams) (UserConfig, error)
- func (q *Queries) DeleteSession(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) DeleteStream(ctx context.Context, id int64) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) DeleteUserConfig(ctx context.Context, id int64) error
- func (q *Queries) GetSession(ctx context.Context, arg GetSessionParams) (GetSessionRow, error)
- func (q *Queries) GetSessionByRefreshToken(ctx context.Context, refreshToken string) (GetSessionByRefreshTokenRow, error)
- func (q *Queries) GetSessionByUserID(ctx context.Context, userID string) (GetSessionByUserIDRow, error)
- func (q *Queries) GetStream(ctx context.Context, arg GetStreamParams) (GetStreamRow, error)
- func (q *Queries) GetStreamAttendanceMembers(ctx context.Context, arg GetStreamAttendanceMembersParams) ([]GetStreamAttendanceMembersRow, error)
- func (q *Queries) GetUser(ctx context.Context, id int64) (GetUserRow, error)
- func (q *Queries) GetUserByUserID(ctx context.Context, userID string) (User, error)
- func (q *Queries) GetUserByUserLogin(ctx context.Context, userLogin string) (User, error)
- func (q *Queries) GetUserConfig(ctx context.Context, arg GetUserConfigParams) (GetUserConfigRow, error)
- func (q *Queries) ListSession(ctx context.Context) ([]ListSessionRow, error)
- func (q *Queries) ListStreams(ctx context.Context, arg ListStreamsParams) ([]ListStreamsRow, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
- func (q *Queries) UpdateSession(ctx context.Context, arg UpdateSessionParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) UpdateUserConfig(ctx context.Context, arg UpdateUserConfigParams) (UserConfig, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SQLStore
- type Session
- type Store
- type Stream
- type UpdateSessionParams
- type UpdateUserConfigParams
- type UpdateUserParams
- type User
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttendanceMember ¶
type AttendanceMember struct { ID int64 `json:"id"` StreamID int64 `json:"stream_id"` Username string `json:"username"` IsShouted bool `json:"is_shouted"` PresentAt pgtype.Timestamptz `json:"present_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` }
type ConfigTypes ¶
type ConfigTypes string
const ( ConfigTypesAutoShoutoutActivation ConfigTypes = "auto_shoutout_activation" ConfigTypesAutoShoutoutDelay ConfigTypes = "auto_shoutout_delay" ConfigTypesBlacklist ConfigTypes = "blacklist" ConfigTypesTimerCardSoActivation ConfigTypes = "timer_card_so_activation" ConfigTypesTimerCardDuration ConfigTypes = "timer_card_duration" )
func (*ConfigTypes) Scan ¶
func (e *ConfigTypes) Scan(src interface{}) error
type CreateAttendanceMemberParams ¶
type CreateAttendanceMemberParams struct { StreamID int64 `json:"stream_id"` Username string `json:"username"` IsShouted bool `json:"is_shouted"` PresentAt pgtype.Timestamptz `json:"present_at"` }
type CreateSessionParams ¶
type CreateSessionParams struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` }
type CreateStreamParams ¶
type CreateUserConfigParams ¶
type CreateUserConfigParams struct { UserID int64 `json:"user_id"` ConfigType ConfigTypes `json:"config_type"` Value string `json:"value"` }
type CreateUserParams ¶
type GetSessionByRefreshTokenRow ¶
type GetSessionByRefreshTokenRow struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` ID_2 int64 `json:"id_2"` UserID_2 string `json:"user_id_2"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt_2 pgtype.Timestamptz `json:"created_at_2"` UpdatedAt_2 pgtype.Timestamptz `json:"updated_at_2"` }
type GetSessionByUserIDRow ¶
type GetSessionByUserIDRow struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` ID_2 int64 `json:"id_2"` UserID_2 string `json:"user_id_2"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt_2 pgtype.Timestamptz `json:"created_at_2"` UpdatedAt_2 pgtype.Timestamptz `json:"updated_at_2"` }
type GetSessionParams ¶
type GetSessionRow ¶
type GetSessionRow struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` ID_2 int64 `json:"id_2"` UserID_2 string `json:"user_id_2"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt_2 pgtype.Timestamptz `json:"created_at_2"` UpdatedAt_2 pgtype.Timestamptz `json:"updated_at_2"` }
type GetStreamAttendanceMembersRow ¶
type GetStreamAttendanceMembersRow struct { Title string `json:"title"` GameName string `json:"game_name"` StartedAt pgtype.Timestamptz `json:"started_at"` Username string `json:"username"` IsShouted bool `json:"is_shouted"` PresentAt pgtype.Timestamptz `json:"present_at"` }
type GetStreamParams ¶
type GetStreamRow ¶
type GetUserConfigParams ¶
type GetUserConfigParams struct { UserID int64 `json:"user_id"` ConfigType ConfigTypes `json:"config_type"` }
type GetUserConfigRow ¶
type GetUserConfigRow struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` ConfigType ConfigTypes `json:"config_type"` Value string `json:"value"` CreatedAt pgtype.Timestamptz `json:"created_at"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` ID_2 int64 `json:"id_2"` UserID_2 string `json:"user_id_2"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt_2 pgtype.Timestamptz `json:"created_at_2"` UpdatedAt_2 pgtype.Timestamptz `json:"updated_at_2"` }
type GetUserRow ¶
type ListSessionRow ¶
type ListSessionRow struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` ID_2 int64 `json:"id_2"` UserID_2 string `json:"user_id_2"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt_2 pgtype.Timestamptz `json:"created_at_2"` UpdatedAt_2 pgtype.Timestamptz `json:"updated_at_2"` }
type ListStreamsParams ¶
type ListStreamsRow ¶
type ListUsersParams ¶
type NullConfigTypes ¶
type NullConfigTypes struct { ConfigTypes ConfigTypes `json:"config_types"` Valid bool `json:"valid"` // Valid is true if ConfigTypes is not NULL }
func (*NullConfigTypes) Scan ¶
func (ns *NullConfigTypes) Scan(value interface{}) error
Scan implements the Scanner interface.
type Querier ¶
type Querier interface { CreateAttendanceMember(ctx context.Context, arg CreateAttendanceMemberParams) (AttendanceMember, error) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) CreateStream(ctx context.Context, arg CreateStreamParams) (Stream, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) CreateUserConfig(ctx context.Context, arg CreateUserConfigParams) (UserConfig, error) DeleteSession(ctx context.Context, id pgtype.UUID) error DeleteStream(ctx context.Context, id int64) error DeleteUser(ctx context.Context, id int64) error DeleteUserConfig(ctx context.Context, id int64) error GetSession(ctx context.Context, arg GetSessionParams) (GetSessionRow, error) GetSessionByRefreshToken(ctx context.Context, refreshToken string) (GetSessionByRefreshTokenRow, error) GetSessionByUserID(ctx context.Context, userID string) (GetSessionByUserIDRow, error) GetStream(ctx context.Context, arg GetStreamParams) (GetStreamRow, error) GetStreamAttendanceMembers(ctx context.Context, arg GetStreamAttendanceMembersParams) ([]GetStreamAttendanceMembersRow, error) GetUser(ctx context.Context, id int64) (GetUserRow, error) GetUserByUserID(ctx context.Context, userID string) (User, error) GetUserByUserLogin(ctx context.Context, userLogin string) (User, error) GetUserConfig(ctx context.Context, arg GetUserConfigParams) (GetUserConfigRow, error) ListSession(ctx context.Context) ([]ListSessionRow, error) ListStreams(ctx context.Context, arg ListStreamsParams) ([]ListStreamsRow, error) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error) UpdateSession(ctx context.Context, arg UpdateSessionParams) error UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) UpdateUserConfig(ctx context.Context, arg UpdateUserConfigParams) (UserConfig, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAttendanceMember ¶
func (q *Queries) CreateAttendanceMember(ctx context.Context, arg CreateAttendanceMemberParams) (AttendanceMember, error)
func (*Queries) CreateSession ¶
func (*Queries) CreateStream ¶
func (*Queries) CreateUser ¶
func (*Queries) CreateUserConfig ¶
func (q *Queries) CreateUserConfig(ctx context.Context, arg CreateUserConfigParams) (UserConfig, error)
func (*Queries) DeleteSession ¶
func (*Queries) DeleteUserConfig ¶
func (*Queries) GetSession ¶
func (q *Queries) GetSession(ctx context.Context, arg GetSessionParams) (GetSessionRow, error)
func (*Queries) GetSessionByRefreshToken ¶
func (*Queries) GetSessionByUserID ¶
func (*Queries) GetStream ¶
func (q *Queries) GetStream(ctx context.Context, arg GetStreamParams) (GetStreamRow, error)
func (*Queries) GetStreamAttendanceMembers ¶
func (q *Queries) GetStreamAttendanceMembers(ctx context.Context, arg GetStreamAttendanceMembersParams) ([]GetStreamAttendanceMembersRow, error)
func (*Queries) GetUserByUserID ¶
func (*Queries) GetUserByUserLogin ¶
func (*Queries) GetUserConfig ¶
func (q *Queries) GetUserConfig(ctx context.Context, arg GetUserConfigParams) (GetUserConfigRow, error)
func (*Queries) ListSession ¶
func (q *Queries) ListSession(ctx context.Context) ([]ListSessionRow, error)
func (*Queries) ListStreams ¶
func (q *Queries) ListStreams(ctx context.Context, arg ListStreamsParams) ([]ListStreamsRow, error)
func (*Queries) UpdateSession ¶
func (q *Queries) UpdateSession(ctx context.Context, arg UpdateSessionParams) error
func (*Queries) UpdateUser ¶
func (*Queries) UpdateUserConfig ¶
func (q *Queries) UpdateUserConfig(ctx context.Context, arg UpdateUserConfigParams) (UserConfig, error)
type Session ¶
type Session struct { ID pgtype.UUID `json:"id"` UserID int64 `json:"user_id"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt pgtype.Timestamptz `json:"expires_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` EncryptedTwitchToken string `json:"encrypted_twitch_token"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` }
type Stream ¶
type Stream struct { ID int64 `json:"id"` // id punya user UserID int64 `json:"user_id"` Title string `json:"title"` GameName string `json:"game_name"` StartedAt pgtype.Timestamptz `json:"started_at"` CreatedAt pgtype.Timestamptz `json:"created_at"` CreatedBy int64 `json:"created_by"` }
type UpdateSessionParams ¶
type UpdateUserConfigParams ¶
type UpdateUserParams ¶
type User ¶
type User struct { ID int64 `json:"id"` // user_id punya twitch UserID string `json:"user_id"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` ProfileImageUrl string `json:"profile_image_url"` CreatedAt pgtype.Timestamptz `json:"created_at"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` }
type UserConfig ¶
type UserConfig struct { ID int64 `json:"id"` // id punya user UserID int64 `json:"user_id"` ConfigType ConfigTypes `json:"config_type"` Value string `json:"value"` CreatedAt pgtype.Timestamptz `json:"created_at"` UpdatedAt pgtype.Timestamptz `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.