Documentation
¶
Index ¶
- func New(ctx context.Context, store *store.Store, config *Config) (*chi.Mux, error)
- type Config
- type ContextKey
- type Policy
- type PolicyEngine
- type PolicyType
- type RequestsEngine
- type RequestsEngineConfig
- type ServerImpl
- func (s *ServerImpl) CreateProject(w http.ResponseWriter, r *http.Request)
- func (s *ServerImpl) CreateRequest(w http.ResponseWriter, r *http.Request)
- func (s *ServerImpl) CreateService(w http.ResponseWriter, r *http.Request)
- func (s *ServerImpl) GetProjectByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
- func (s *ServerImpl) GetProjects(w http.ResponseWriter, r *http.Request, params oapi.GetProjectsParams)
- func (s *ServerImpl) GetRequestByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
- func (s *ServerImpl) GetRequests(w http.ResponseWriter, r *http.Request, params oapi.GetRequestsParams)
- func (s *ServerImpl) GetRequestsSpec(w http.ResponseWriter, r *http.Request)
- func (s *ServerImpl) GetServiceByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
- func (s *ServerImpl) GetServices(w http.ResponseWriter, r *http.Request, params oapi.GetServicesParams)
- func (s ServerImpl) GetUserInfo(w http.ResponseWriter, r *http.Request)
- func (s *ServerImpl) ReviewRequest(w http.ResponseWriter, r *http.Request, id uuid.UUID)
- type Session
- type Sessioner
- type UserClaims
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { DevMode bool RedirectURI string RequestsEngine RequestsEngineConfig }
func DefaultConfig ¶
func DefaultConfig() Config
type ContextKey ¶
type ContextKey string
ContextKey is used to store the auth context value in the request context
type Policy ¶
type Policy struct { Name string Type PolicyType Module string }
type PolicyEngine ¶
type PolicyEngine struct {
Policies map[PolicyType][]Policy
}
func NewPolicyEngine ¶
func NewPolicyEngine() *PolicyEngine
func (PolicyEngine) EvaluateLoginRequest ¶
func (pe PolicyEngine) EvaluateLoginRequest(userInfo UserInfo) (bool, error)
type PolicyType ¶
type PolicyType string
const ( LoginPolicyType PolicyType = "login" AccessPolicyType PolicyType = "access" )
type RequestsEngine ¶
type RequestsEngine struct {
// contains filtered or unexported fields
}
RequestsEngine is responsible for storing all the requests, validting incoming requets, and providing the frontend with request specs
func NewRequestsEngine ¶
func NewRequestsEngine(config *RequestsEngineConfig) (*RequestsEngine, error)
func (*RequestsEngine) OpenAPISpec ¶
func (e *RequestsEngine) OpenAPISpec() []byte
func (*RequestsEngine) Validate ¶
func (e *RequestsEngine) Validate(input oapi.NewRequest) error
type RequestsEngineConfig ¶
func DefaultRequestsEngineConfig ¶
func DefaultRequestsEngineConfig() RequestsEngineConfig
type ServerImpl ¶
type ServerImpl struct {
// contains filtered or unexported fields
}
func (*ServerImpl) CreateProject ¶
func (s *ServerImpl) CreateProject(w http.ResponseWriter, r *http.Request)
func (*ServerImpl) CreateRequest ¶
func (s *ServerImpl) CreateRequest(w http.ResponseWriter, r *http.Request)
func (*ServerImpl) CreateService ¶
func (s *ServerImpl) CreateService(w http.ResponseWriter, r *http.Request)
func (*ServerImpl) GetProjectByID ¶
func (s *ServerImpl) GetProjectByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
func (*ServerImpl) GetProjects ¶
func (s *ServerImpl) GetProjects(w http.ResponseWriter, r *http.Request, params oapi.GetProjectsParams)
func (*ServerImpl) GetRequestByID ¶
func (s *ServerImpl) GetRequestByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
func (*ServerImpl) GetRequests ¶
func (s *ServerImpl) GetRequests(w http.ResponseWriter, r *http.Request, params oapi.GetRequestsParams)
func (*ServerImpl) GetRequestsSpec ¶
func (s *ServerImpl) GetRequestsSpec(w http.ResponseWriter, r *http.Request)
func (*ServerImpl) GetServiceByID ¶
func (s *ServerImpl) GetServiceByID(w http.ResponseWriter, r *http.Request, id uuid.UUID)
func (*ServerImpl) GetServices ¶
func (s *ServerImpl) GetServices(w http.ResponseWriter, r *http.Request, params oapi.GetServicesParams)
func (ServerImpl) GetUserInfo ¶
func (s ServerImpl) GetUserInfo(w http.ResponseWriter, r *http.Request)
func (*ServerImpl) ReviewRequest ¶
func (s *ServerImpl) ReviewRequest(w http.ResponseWriter, r *http.Request, id uuid.UUID)
type Sessioner ¶
type Sessioner struct {
// contains filtered or unexported fields
}
func (*Sessioner) AuthorizeSession ¶
func (*Sessioner) NewSession ¶
func (s *Sessioner) NewSession(w http.ResponseWriter, claims *UserClaims)
type UserClaims ¶
Click to show internal directories.
Click to hide internal directories.