Documentation ¶
Index ¶
- func Create(value interface{}) error
- func DeleteByID(model interface{}, id uint64) (count int64, err error)
- func DeleteByIDS(model interface{}, ids []uint64) (count int64, err error)
- func DeleteByModel(model interface{}) (count int64, err error)
- func DeleteByWhere(model, where interface{}) (count int64, err error)
- func Find(where interface{}, out interface{}, associations []string, orders ...string) error
- func First(where interface{}, out interface{}, associations []string) (notFound bool, err error)
- func FirstByID(out interface{}, id string) (notFound bool, err error)
- func Save(value interface{}) error
- func Scan(model, where interface{}, out interface{}) (notFound bool, err error)
- func ScanList(model, where interface{}, out interface{}, orders ...string) error
- func Updates(where interface{}, value interface{}) error
- type Alias2dataRepository
- type DockerRepository
- type SiteStatus
- type Sites
- type TaskRepository
- func (r *TaskRepository) Add(task *models.Task) error
- func (r *TaskRepository) All() (*[]models.Task, error)
- func (r *TaskRepository) Delete(task *models.Task) error
- func (r *TaskRepository) Get(id string) (*models.Task, error)
- func (r *TaskRepository) Query(q *models.Task) (*[]models.Task, error)
- func (r *TaskRepository) Update(task *models.Task) error
- type TinyRepository
- func (r *TinyRepository) QueryOriLinkByOriMd5(OriMd5 string) (*models.Tiny, error)
- func (r *TinyRepository) QueryOriLinkByTinyKey(TinyKey string) (string, error)
- func (r *TinyRepository) RecordVisitCountByTinyKey(TinyKey string) (bool, error)
- func (r *TinyRepository) SaveOriLink(OriLink string, addBaseUrl string, oneTime bool) (string, error)
- func (r *TinyRepository) SaveTinyLink(TinyId uint64, TinyLink string, TinyKey string, oneTime bool) (bool, error)
- type UserRepository
- func (r *UserRepository) Add(user *models.User) error
- func (r *UserRepository) All() (*[]models.User, error)
- func (r *UserRepository) Delete(user *models.User) error
- func (r *UserRepository) Get(id string) (*models.User, error)
- func (r *UserRepository) GetByUsername(username string) (*models.User, error)
- func (r *UserRepository) Query(q *models.User) (*[]models.User, error)
- func (r *UserRepository) Update(user *models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByIDS ¶
Delete
Types ¶
type Alias2dataRepository ¶
type Alias2dataRepository struct{}
func GetAlias2dataRepository ¶
func GetAlias2dataRepository() *Alias2dataRepository
func (*Alias2dataRepository) Add ¶
func (r *Alias2dataRepository) Add(alias2data *models.Alias2data) error
func (*Alias2dataRepository) CountByAlias ¶ added in v1.2.0
func (r *Alias2dataRepository) CountByAlias(alias string) (int, error)
func (*Alias2dataRepository) Get ¶
func (r *Alias2dataRepository) Get(alias string) (*models.Alias2data, error)
type DockerRepository ¶ added in v1.2.0
type DockerRepository struct{}
func GetDockerRepository ¶ added in v1.2.0
func GetDockerRepository() *DockerRepository
func (*DockerRepository) GetTagName ¶ added in v1.2.0
type SiteStatus ¶
type Sites ¶
type Sites struct {
List map[string]SiteStatus
}
func GetRobotRepository ¶
func GetRobotRepository() *Sites
type TaskRepository ¶
type TaskRepository struct{}
func GetTaskRepository ¶
func GetTaskRepository() *TaskRepository
type TinyRepository ¶ added in v1.2.0
type TinyRepository struct{}
func GetTinyRepository ¶ added in v1.2.0
func GetTinyRepository() *TinyRepository
func (*TinyRepository) QueryOriLinkByOriMd5 ¶ added in v1.2.0
func (r *TinyRepository) QueryOriLinkByOriMd5(OriMd5 string) (*models.Tiny, error)
func (*TinyRepository) QueryOriLinkByTinyKey ¶ added in v1.2.0
func (r *TinyRepository) QueryOriLinkByTinyKey(TinyKey string) (string, error)
func (*TinyRepository) RecordVisitCountByTinyKey ¶ added in v1.5.1
func (r *TinyRepository) RecordVisitCountByTinyKey(TinyKey string) (bool, error)
func (*TinyRepository) SaveOriLink ¶ added in v1.2.0
func (*TinyRepository) SaveTinyLink ¶ added in v1.2.0
type UserRepository ¶
type UserRepository struct{}
func GetUserRepository ¶
func GetUserRepository() *UserRepository
func (*UserRepository) GetByUsername ¶
func (r *UserRepository) GetByUsername(username string) (*models.User, error)
Click to show internal directories.
Click to hide internal directories.