repo

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contest

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

func NewContest

func NewContest(db *gorm.DB) *Contest

func NewContestWithDBConn

func NewContestWithDBConn(dbConn *database.DBConn) *Contest

func (Contest) Create

func (r Contest) Create(ctx context.Context, model *T) error

func (Contest) CreateBatch

func (r Contest) CreateBatch(ctx context.Context, models []T) error

func (Contest) Delete

func (r Contest) Delete(ctx context.Context, model *T) error

func (Contest) Find

func (r Contest) Find(ctx context.Context, id string) (*T, error)

func (*Contest) FindByIDs

func (r *Contest) FindByIDs(ctx context.Context, ids []string) ([]models.Contest, error)

func (*Contest) FindWithTasks

func (r *Contest) FindWithTasks(ctx context.Context, id string) (*models.Contest, error)

func (*Contest) Search

func (r *Contest) Search(ctx context.Context, p *params.Contest) ([]models.Contest, error)

func (Contest) TableName

func (r Contest) TableName() string

func (*Contest) Truncate

func (r *Contest) Truncate(ctx context.Context) error

func (Contest) Tx

func (r Contest) Tx(f func(conn *database.DBConn) error) error

func (Contest) Update

func (r Contest) Update(ctx context.Context, model *T) error

func (Contest) UpdateWithChilds

func (r Contest) UpdateWithChilds(ctx context.Context, models *T) error

type ContestTask

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

func NewContestTask

func NewContestTask(db *gorm.DB) *ContestTask

func NewContestTaskWithDBConn

func NewContestTaskWithDBConn(dbConn *database.DBConn) *ContestTask

func (ContestTask) Create

func (r ContestTask) Create(ctx context.Context, model *T) error

func (ContestTask) CreateBatch

func (r ContestTask) CreateBatch(ctx context.Context, models []T) error

func (ContestTask) Delete

func (r ContestTask) Delete(ctx context.Context, model *T) error

func (ContestTask) Find

func (r ContestTask) Find(ctx context.Context, id string) (*T, error)

func (*ContestTask) FindByIDs

func (r *ContestTask) FindByIDs(ctx context.Context, contestID, taskID string) (*models.ContestTask, error)

func (ContestTask) TableName

func (r ContestTask) TableName() string

func (ContestTask) Truncate

func (r ContestTask) Truncate(ctx context.Context) error

func (ContestTask) Tx

func (r ContestTask) Tx(f func(conn *database.DBConn) error) error

func (ContestTask) Update

func (r ContestTask) Update(ctx context.Context, model *T) error

func (ContestTask) UpdateWithChilds

func (r ContestTask) UpdateWithChilds(ctx context.Context, models *T) error

type RatedType

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

func NewRateType

func NewRateType(db *gorm.DB) *RatedType

func NewRatedTypeWithDBConn

func NewRatedTypeWithDBConn(dbConn *database.DBConn) *RatedType

func (RatedType) Create

func (r RatedType) Create(ctx context.Context, model *T) error

func (RatedType) CreateBatch

func (r RatedType) CreateBatch(ctx context.Context, models []T) error

func (RatedType) Delete

func (r RatedType) Delete(ctx context.Context, model *T) error

func (RatedType) Find

func (r RatedType) Find(ctx context.Context, id string) (*T, error)

func (RatedType) TableName

func (r RatedType) TableName() string

func (RatedType) Truncate

func (r RatedType) Truncate(ctx context.Context) error

func (RatedType) Tx

func (r RatedType) Tx(f func(conn *database.DBConn) error) error

func (RatedType) Update

func (r RatedType) Update(ctx context.Context, model *T) error

func (RatedType) UpdateWithChilds

func (r RatedType) UpdateWithChilds(ctx context.Context, models *T) error

type Task

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

func NewTask

func NewTask(db *gorm.DB) *Task

func NewTaskWithDBConn

func NewTaskWithDBConn(dbConn *database.DBConn) *Task

func (Task) Create

func (r Task) Create(ctx context.Context, model *T) error

func (Task) CreateBatch

func (r Task) CreateBatch(ctx context.Context, models []T) error

func (Task) Delete

func (r Task) Delete(ctx context.Context, model *T) error

func (Task) Find

func (r Task) Find(ctx context.Context, id string) (*T, error)

func (*Task) FindWithSamples

func (r *Task) FindWithSamples(ctx context.Context, taskID string) (*models.Task, error)

func (Task) TableName

func (r Task) TableName() string

func (Task) Truncate

func (r Task) Truncate(ctx context.Context) error

func (Task) Tx

func (r Task) Tx(f func(conn *database.DBConn) error) error

func (Task) Update

func (r Task) Update(ctx context.Context, model *T) error

func (Task) UpdateWithChilds

func (r Task) UpdateWithChilds(ctx context.Context, models *T) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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