Documentation ¶
Index ¶
- Variables
- func NewMySQL(c *common.DataConfig, logger log.Logger) (*gorm.DB, func(), error)
- func NewRedis(c *common.DataConfig, logger log.Logger) (*redis.Client, func(), error)
- func NewRedisCache(redisClient *redis.Client) (goCache.Cache, error)
- type Application
- func (s *Application) Add(ctx context.Context, in *models.Application, opts ...igorm.Option) error
- func (s *Application) CountByName(ctx context.Context, name string, opts ...igorm.Option) (int64, error)
- func (s *Application) CountByNameWithInclude(ctx context.Context, name, excludeId string, opts ...igorm.Option) (int64, error)
- func (s *Application) Delete(ctx context.Context, id string, opts ...igorm.Option) error
- func (s *Application) Find(ctx context.Context, size int, offset string, opts ...igorm.Option) ([]*models.Application, string, error)
- func (s *Application) Get(ctx context.Context, id string, opts ...igorm.Option) (*models.Application, error)
- func (s *Application) Session(ctx context.Context, opts ...igorm.Option) *gorm.DB
- func (s *Application) Update(ctx context.Context, in *models.Application, opts ...igorm.Option) error
- func (s *Application) UpdateSecret(ctx context.Context, id, secret string, opts ...igorm.Option) error
- func (s *Application) UpdateStatus(ctx context.Context, id string, status v1.ApplicationStatus, ...) error
- type TimerCallback
- func (s *TimerCallback) Add(ctx context.Context, in *models.TimerCallback, opts ...igorm.Option) error
- func (s *TimerCallback) FindByTime(ctx context.Context, start, end time.Time, status v1.TimerCallbackStatus, ...) ([]*models.TimerCallback, error)
- func (s *TimerCallback) FindByTimerId(ctx context.Context, timerId, offset string, size int, opts ...igorm.Option) ([]*models.TimerCallback, string, error)
- func (s *TimerCallback) Session(ctx context.Context, opts ...igorm.Option) *gorm.DB
- type TimerRecord
- func (s *TimerRecord) Add(ctx context.Context, in *models.Timer, opts ...igorm.Option) error
- func (s *TimerRecord) Delete(ctx context.Context, id string, opts ...igorm.Option) error
- func (s *TimerRecord) Find(ctx context.Context, size int, offset string, opts ...igorm.Option) ([]*models.Timer, string, error)
- func (s *TimerRecord) Get(ctx context.Context, id string, opts ...igorm.Option) (*models.Timer, error)
- func (s *TimerRecord) Session(ctx context.Context, opts ...igorm.Option) *gorm.DB
- func (s *TimerRecord) Update(ctx context.Context, in *models.Timer, opts ...igorm.Option) error
- func (s *TimerRecord) UpdateStatus(ctx context.Context, id string, status v1.TimerStatus, opts ...igorm.Option) error
- type Token
- type User
- func (s *User) Add(ctx context.Context, in *models.User, opts ...igorm.Option) error
- func (s *User) CountByName(ctx context.Context, name string, opts ...igorm.Option) (int64, error)
- func (s *User) CountByNameWithInclude(ctx context.Context, name, excludeId string, opts ...igorm.Option) (int64, error)
- func (s *User) Delete(ctx context.Context, id int64, opts ...igorm.Option) error
- func (s *User) FindByOffset(ctx context.Context, size int, offset string, opts ...igorm.Option) ([]*models.User, string, error)
- func (s *User) FindByPage(ctx context.Context, page, size int, opts ...igorm.Option) ([]*models.User, error)
- func (s *User) Get(ctx context.Context, id string, opts ...igorm.Option) (*models.User, error)
- func (s *User) Session(ctx context.Context, opts ...igorm.Option) *gorm.DB
- func (s *User) Update(ctx context.Context, in *models.User, opts ...igorm.Option) error
- func (s *User) UpdateStatus(ctx context.Context, id string, status v1.UserStatus, opts ...igorm.Option) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewMySQL, NewRedis, NewRedisCache, NewUser, NewApplication, NewTimer, NewTimerCallback, )
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(db *gorm.DB) *Application
func (*Application) Add ¶
func (s *Application) Add(ctx context.Context, in *models.Application, opts ...igorm.Option) error
func (*Application) CountByName ¶
func (*Application) CountByNameWithInclude ¶
func (*Application) Get ¶
func (s *Application) Get(ctx context.Context, id string, opts ...igorm.Option) (*models.Application, error)
func (*Application) Update ¶
func (s *Application) Update(ctx context.Context, in *models.Application, opts ...igorm.Option) error
func (*Application) UpdateSecret ¶
func (*Application) UpdateStatus ¶
func (s *Application) UpdateStatus(ctx context.Context, id string, status v1.ApplicationStatus, opts ...igorm.Option) error
type TimerCallback ¶
type TimerCallback struct {
// contains filtered or unexported fields
}
func NewTimerCallback ¶
func NewTimerCallback(db *gorm.DB) *TimerCallback
func (*TimerCallback) Add ¶
func (s *TimerCallback) Add(ctx context.Context, in *models.TimerCallback, opts ...igorm.Option) error
func (*TimerCallback) FindByTime ¶
func (s *TimerCallback) FindByTime(ctx context.Context, start, end time.Time, status v1.TimerCallbackStatus, opts ...igorm.Option) ([]*models.TimerCallback, error)
func (*TimerCallback) FindByTimerId ¶
type TimerRecord ¶
type TimerRecord struct {
// contains filtered or unexported fields
}
func NewTimer ¶
func NewTimer(db *gorm.DB) *TimerRecord
func (*TimerRecord) UpdateStatus ¶
func (s *TimerRecord) UpdateStatus(ctx context.Context, id string, status v1.TimerStatus, opts ...igorm.Option) error
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) CountByName ¶
func (*User) CountByNameWithInclude ¶
func (*User) FindByOffset ¶
func (*User) FindByPage ¶
Click to show internal directories.
Click to hide internal directories.