Documentation
¶
Index ¶
- Constants
- Variables
- func WithAuthGroupFilter(v *gitlab.ListGroupsOptions) func(*AuthHandler)
- func WithAuthMetrics(v *metrics.Metrics) func(*AuthHandler)
- func WithAuthUserACLs(v map[string]userauthz.Authorizer) func(*AuthHandler)
- func WithAuthUserCache(v *cache.UserInfoCache) func(*AuthHandler)
- func WithAuthUserTransform(v *access.UserInfoOptions) func(*AuthHandler)
- type AuthHandler
- type FilesystemHandler
- type FilesystemHandlerOpts
Constants ¶
View Source
const (
KindTokenReview = "TokenReview"
)
Variables ¶
View Source
var DefaultGitlabURL, _ = url.Parse("https://gitlab.com/")
View Source
var (
ErrMissingToken = errors.New("Missing token")
)
Functions ¶
func WithAuthGroupFilter ¶
func WithAuthGroupFilter(v *gitlab.ListGroupsOptions) func(*AuthHandler)
func WithAuthMetrics ¶
func WithAuthMetrics(v *metrics.Metrics) func(*AuthHandler)
func WithAuthUserACLs ¶
func WithAuthUserACLs(v map[string]userauthz.Authorizer) func(*AuthHandler)
func WithAuthUserCache ¶
func WithAuthUserCache(v *cache.UserInfoCache) func(*AuthHandler)
func WithAuthUserTransform ¶
func WithAuthUserTransform(v *access.UserInfoOptions) func(*AuthHandler)
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(client *gitlab.Client, logger *slog.Logger, opts ...func(*AuthHandler)) (result *AuthHandler, err error)
func (*AuthHandler) ServeHTTP ¶
func (h *AuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type FilesystemHandler ¶
type FilesystemHandler struct {
// contains filtered or unexported fields
}
func FilesystemHandlerFor ¶
func FilesystemHandlerFor(dir string, opts FilesystemHandlerOpts) (*FilesystemHandler, error)
func (*FilesystemHandler) ServeHTTP ¶
func (h *FilesystemHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type FilesystemHandlerOpts ¶
type FilesystemHandlerOpts struct { // Application name Name string // Version information Version string // Freeform text describing the purpose of the application Description string // URL for users to visit for token generation GitlabURL *url.URL // Process start time to use as cache buster or information StartTime time.Time // Custom information to be used in the template ExtraData map[string]interface{} }
Click to show internal directories.
Click to hide internal directories.