Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + func WithBundle(diceBundle *bundle.Bundle) + func WithDB(db *models.DBClient) + func WithEtcdClient(client *clientv3.Client) + func WithI18n(i18n i18n.Translator) + func WithOrgClient(org org.ClientInterface) + func WithTokenService(tokenService *tokenpb.TokenServiceServer) + func WithUCAuth(ucAuth *uc.UCUserAuth) + func WrapHandler(handlerFunc ContextHandlerFunc) echo.HandlerFunc + func WrapHandlerWithRepoCheck(handlerFunc ContextHandlerFunc) echo.HandlerFunc + func WrapMiddlewareHandler(handlerFunc ContextHandlerFunc) echo.MiddlewareFunc + type ApiData struct + Data interface{} + Err interface{} + Success bool + UserIDs []string + type Context struct + Bundle *bundle.Bundle + DBClient *models.DBClient + EchoContext echo.Context + EtcdClient *clientv3.Client + Repository *gitmodule.Repository + Service *models.Service + TokenService tokenpb.TokenServiceServer + UCAuth *uc.UCUserAuth + User *models.User + func NewEchoContext(c echo.Context, db *models.DBClient) *Context + func (c *Context) Abort(err error) + func (c *Context) AbortWithData(code int, data interface{}) + func (c *Context) AbortWithStatus(code int, err ...error) + func (c *Context) AbortWithString(code int, msg string) + func (c *Context) BasicAuth() (username, password string, ok bool) + func (c *Context) BindJSON(obj interface{}) error + func (c *Context) CheckBranchOperatePermission(user *models.User, branch string) error + func (c *Context) CheckPermission(permission models.Permission) error + func (c *Context) CheckPermissionWithRole(permission models.Permission, resourceRoleList []string) error + func (c *Context) Data(statusCode int, contentType string, buf []byte) + func (c *Context) File(path string) + func (c *Context) GetHeader(key string) string + func (c *Context) GetOrg(orgID interface{}) (*orgpb.Org, error) + func (c *Context) GetOrgByDomain(domain, userID string) (*orgpb.Org, error) + func (c *Context) GetQueryBool(key string, defaults ...bool) bool + func (c *Context) GetQueryInt32(key string, defaults ...int) int + func (c *Context) GetRequestBody() io.ReadCloser + func (c *Context) GetWriter() io.Writer + func (c *Context) Header(key string, value string) + func (c *Context) Host() string + func (c *Context) HttpRequest() *http.Request + func (c *Context) MustGet(key string) interface{} + func (c *Context) Next() + func (c *Context) Param(key string) string + func (c *Context) ParamInt32(key string, defaults ...int) int + func (c *Context) Query(key string) string + func (c *Context) Set(key string, value interface{}) + func (c *Context) Status(status int) + func (c *Context) Success(data interface{}, userIDs ...[]string) + type ContextHandlerFunc func(*Context)