Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

router

v1.1.1
djinn-ci.com/provider/router

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

7 matches

Top ↑

Functions

Gate

func Gate(db *sqlx.DB) web.Gate

Gate returns a web.Gate that checks if the current authenticated user has the access permissions to the provider's repository being accessed. If the current user has access ot the current repository, then it is set in the request's context.

Types

Router

type Router struct {
	// contains filtered or unexported fields
}

Router is what registers the UI routes for handling integrating with an external provider.

New

func New(cfg *config.Server, h web.Handler, mw web.Middleware) *Router

Router.RegisterAPI

func (*Router) RegisterAPI(_ string, _ *mux.Router, _ ...web.Gate)

RegisterAPI is a stub method to implement the server.Router interface.

Router.RegisterUI

func (r *Router) RegisterUI(mux *mux.Router, csrf func(http.Handler) http.Handler, gates ...web.Gate)

RegisterUI registers the UI routes for handling integration with a provider. This will register the routes for connecting to a provider, and the routes for toggling webhooks on a provider's repository.

Dependency graph