Documentation ¶
Index ¶
- Variables
- func GetUserID(ctx context.Context) (int, error)
- func NewLogger(env string) *logrus.Logger
- func ReplaceInvisible(content string) string
- func SetUserID(ctx context.Context, userID int) context.Context
- type ACL
- type Diff
- type DiffPreprocessorFunc
- type GithubUser
- type JWT
- type JWTConfig
- type OAuth
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAccess = errors.New("access denied")
ErrNoAccess means user doesn't have necessary permissions for a resource
Functions ¶
func ReplaceInvisible ¶ added in v0.0.6
ReplaceInvisible preprocessor function that replace invisible character with visible onces
Types ¶
type ACL ¶
type ACL struct {
// contains filtered or unexported fields
}
ACL allows to manage permissions for user role
type Diff ¶ added in v0.0.4
type Diff struct {
// contains filtered or unexported fields
}
Diff service generates diff for files
type DiffPreprocessorFunc ¶ added in v0.0.6
DiffPreprocessorFunc type is function signature to preprocess diffs
type GithubUser ¶ added in v0.0.1
type GithubUser struct { ID int `json:"id"` Login string `json:"login"` Username string `json:"name"` AvatarURL string `json:"avatar_url"` Role model.Role `json:"-"` }
GithubUser represents the user response returned by the GitHub auth.
type JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
JWT service abstracts JWT implementation
type JWTConfig ¶
type JWTConfig struct {
SigningKey string `envconfig:"SIGNING_KEY" required:"true"`
}
JWTConfig defines enviroment variables for JWT
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
OAuth service abstracts OAuth implementation
func (*OAuth) MakeAuthURL ¶
MakeAuthURL returns string for redirect to provider
type OAuthConfig ¶
type OAuthConfig struct { ClientID string `envconfig:"CLIENT_ID" required:"true"` ClientSecret string `envconfig:"CLIENT_SECRET" required:"true"` RestrictAccess string `envconfig:"RESTRICT_ACCESS"` RestrictRequesterAccess string `envconfig:"RESTRICT_REQUESTER_ACCESS"` }
OAuthConfig defines enviroment variables for OAuth
Click to show internal directories.
Click to hide internal directories.