store

package
v0.0.0-...-4e30d13 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedMigrations embed.FS

Functions

func MaybeRunMigrations

func MaybeRunMigrations(dialect string, db *sql.DB)

Types

type CreateModuleConfigurationParams

type CreateModuleConfigurationParams struct {
	Module string      `json:"module"`
	Key    string      `json:"key"`
	Data   interface{} `json:"data"`
}

type CreateSeenObservationParams

type CreateSeenObservationParams struct {
	ID        int64  `json:"id"`
	ChannelID string `json:"channel_id"`
	ProjectID int64  `json:"project_id"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteModuleConfigurationParams

type DeleteModuleConfigurationParams struct {
	Module string `json:"module"`
	Key    string `json:"key"`
}

type FeaturedMessage

type FeaturedMessage struct {
	GuildID   string    `json:"guild_id"`
	ChannelID string    `json:"channel_id"`
	MessageID string    `json:"message_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type FindIsMessageFeaturedParams

type FindIsMessageFeaturedParams struct {
	ChannelID string `json:"channel_id"`
	MessageID string `json:"message_id"`
	GuildID   string `json:"guild_id"`
}

type FindModuleConfigurationParams

type FindModuleConfigurationParams struct {
	Module string `json:"module"`
	Key    string `json:"key"`
}

type FindObservationsParams

type FindObservationsParams struct {
	ProjectID int64   `json:"project_id"`
	ChannelID string  `json:"channel_id"`
	ID        []int64 `json:"id"`
}

type ModuleConfiguration

type ModuleConfiguration struct {
	Module string      `json:"module"`
	Key    string      `json:"key"`
	Data   interface{} `json:"data"`
}

type Queries

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

func Init

func Init(location string) (*Queries, error)

func New

func New(db DBTX) *Queries

func (*Queries) CreateModuleConfiguration

func (q *Queries) CreateModuleConfiguration(ctx context.Context, arg CreateModuleConfigurationParams) (ModuleConfiguration, error)

func (*Queries) CreateSeenObservation

func (q *Queries) CreateSeenObservation(ctx context.Context, arg CreateSeenObservationParams) (SeenObservation, error)

func (*Queries) DeleteModuleConfiguration

func (q *Queries) DeleteModuleConfiguration(ctx context.Context, arg DeleteModuleConfigurationParams) (ModuleConfiguration, error)

func (*Queries) FindIsMessageFeatured

func (q *Queries) FindIsMessageFeatured(ctx context.Context, arg FindIsMessageFeaturedParams) (int64, error)

func (*Queries) FindModuleConfiguration

func (q *Queries) FindModuleConfiguration(ctx context.Context, arg FindModuleConfigurationParams) (ModuleConfiguration, error)

func (*Queries) FindModuleConfigurations

func (q *Queries) FindModuleConfigurations(ctx context.Context, module string) ([]ModuleConfiguration, error)

func (*Queries) FindObservations

func (q *Queries) FindObservations(ctx context.Context, arg FindObservationsParams) ([]SeenObservation, error)

func (*Queries) SaveFeaturedMessage

func (q *Queries) SaveFeaturedMessage(ctx context.Context, arg SaveFeaturedMessageParams) (FeaturedMessage, error)

func (*Queries) UpdateModuleConfiguration

func (q *Queries) UpdateModuleConfiguration(ctx context.Context, arg UpdateModuleConfigurationParams) (ModuleConfiguration, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type SaveFeaturedMessageParams

type SaveFeaturedMessageParams struct {
	MessageID string `json:"message_id"`
	ChannelID string `json:"channel_id"`
	GuildID   string `json:"guild_id"`
}

type SeenObservation

type SeenObservation struct {
	ID        int64     `json:"id"`
	ChannelID string    `json:"channel_id"`
	ProjectID int64     `json:"project_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type UpdateModuleConfigurationParams

type UpdateModuleConfigurationParams struct {
	Data   interface{} `json:"data"`
	Key    string      `json:"key"`
	Module string      `json:"module"`
}

Jump to

Keyboard shortcuts

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