Documentation
¶
Index ¶
- type Interactor
- type Web
- func (w *Web) IndexHTML(c *gin.Context)
- func (w *Web) IndexString(c *gin.Context)
- func (w *Web) RedirectToConfig(c *gin.Context)
- func (w *Web) RedirectToNewConfig(c *gin.Context)
- func (w *Web) SignOutHTML(c *gin.Context)
- func (w *Web) SignOutString(c *gin.Context)
- func (w *Web) Signin(c *gin.Context)
- type WebConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interactor ¶
type Interactor interface {
FindUserByID(ctx context.Context, id int64) (*ent.User, error)
IsAdminUser(ctx context.Context, login string) bool
IsEntryMember(ctx context.Context, login string) bool
IsOrgMember(ctx context.Context, orgs []string) bool
CreateUser(ctx context.Context, u *ent.User) (*ent.User, error)
UpdateUser(ctx context.Context, u *ent.User) (*ent.User, error)
// Fetch the user information from SCM.
// It has the id, login, avatar and so on.
GetRemoteUserByToken(ctx context.Context, token string) (*extent.RemoteUser, error)
ListRemoteOrgsByToken(ctx context.Context, token string) ([]string, error)
FindUserByHash(ctx context.Context, hash string) (*ent.User, error)
FindRepoOfUserByNamespaceName(ctx context.Context, u *ent.User, opt *i.FindRepoOfUserByNamespaceNameOptions) (*ent.Repo, error)
GetConfigRedirectURL(ctx context.Context, u *ent.User, r *ent.Repo) (string, error)
GetNewConfigRedirectURL(ctx context.Context, u *ent.User, r *ent.Repo) (string, error)
GetLicense(ctx context.Context) (*extent.License, error)
}
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
func (*Web) IndexString ¶
func (*Web) RedirectToConfig ¶
RedirectToConfig redirects to the URL to read the configuration file.
func (*Web) RedirectToNewConfig ¶
RedirectToNewConfig redirect to the URL to create a new file.
func (*Web) SignOutHTML ¶
func (*Web) SignOutString ¶
Click to show internal directories.
Click to hide internal directories.