Documentation ¶
Index ¶
- func CountUsers(c context.Context) (int, error)
- func CreateRepo(c context.Context, repo *model.Repo) error
- func CreateUser(c context.Context, user *model.User) error
- func DeleteRepo(c context.Context, repo *model.Repo) error
- func DeleteUser(c context.Context, user *model.User) error
- func GetRepo(c context.Context, id int64) (*model.Repo, error)
- func GetRepoByOwnerName(c context.Context, owner, name string) (*model.Repo, error)
- func GetUser(c context.Context, id int64) (*model.User, error)
- func GetUserLogin(c context.Context, login string) (*model.User, error)
- func ToContext(c Setter, store Store)
- func UpdateRepo(c context.Context, repo *model.Repo) error
- func UpdateUser(c context.Context, user *model.User) error
- type RepoStore
- type Setter
- type Store
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoByOwnerName ¶
Types ¶
type RepoStore ¶
type RepoStore interface { // Get gets a repo by unique ID. Get(int64) (*model.Repo, error) // GetByName gets a repo by owner and name. GetByName(string, string) (*model.Repo, error) // Get all repos. GetRepoList() ([]*model.Repo, error) // Create creates a new repository. Create(*model.Repo) error // Update updates a repository. Update(*model.Repo) error // Delete deletes a user repository. Delete(*model.Repo) error }
type Setter ¶
type Setter interface {
Set(string, interface{})
}
Setter defines a context that enables setting values.
type Store ¶
func FromContext ¶
FromContext returns the Store associated with this context.
type UserStore ¶
type UserStore interface { // Get gets user by unique ID. Get(int64) (*model.User, error) // GetLogin gets a user by unique Login name. GetLogin(string) (*model.User, error) // Count gets the number of users in the store. Count() (int, error) // Create creates a new user account. Create(*model.User) error // Update updates a user account. Update(*model.User) error // Delete deletes a user account. Delete(*model.User) error }
Click to show internal directories.
Click to hide internal directories.