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) 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 Global
- func (s *Global) Add(ctx context.Context, in *models.Global, opts ...igorm.Option) (int64, error)
- func (s *Global) DeleteByKey(ctx context.Context, namespace, name string, opts ...igorm.Option) error
- func (s *Global) GetByName(ctx context.Context, namespace, name string, opts ...igorm.Option) (*models.Global, error)
- func (s *Global) UpsertByKey(ctx context.Context, in *models.Global, opts ...igorm.Option) error
- type Task
- func (s *Task) Add(ctx context.Context, in *models.Task, opts ...igorm.Option) (int64, error)
- func (s *Task) FindByTime(ctx context.Context, offset string, start, end time.Time, size int, ...) ([]*models.Task, string, error)
- func (s *Task) FindByTimerId(ctx context.Context, timerId, offset string, size int, status v1.TaskStatus, ...) ([]*models.Task, string, error)
- 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) 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 string, 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) GetByName(ctx context.Context, name string, opts ...igorm.Option) (*models.User, error)
- func (s *User) Update(ctx context.Context, in *models.User, opts ...igorm.Option) error
- func (s *User) UpdatePassword(ctx context.Context, id, password string, 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, NewGlobal, NewApplication, NewToken, NewUser, NewTimer, NewTask, )
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 Global ¶
type Global struct {
// contains filtered or unexported fields
}
func (*Global) DeleteByKey ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) FindByTime ¶
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 Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetByRefreshToken ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) CountByName ¶
func (*User) CountByNameWithInclude ¶
func (*User) FindByOffset ¶
func (*User) FindByPage ¶
func (*User) UpdatePassword ¶
Click to show internal directories.
Click to hide internal directories.