Documentation ¶
Index ¶
- func Authentication(authenticationType string) gin.HandlerFunc
- func Get(spc *core.ServiceProviderConfig) *gin.Engine
- func MethodNotImplemented(notSupportedMethods []string) gin.HandlerFunc
- func Scim2(group *gin.RouterGroup, resource Service)
- func Set(key string, val interface{}) gin.HandlerFunc
- func Status(code int) gin.HandlerFunc
- func Storage(adapter storage.Storer) gin.HandlerFunc
- type AuthenticationScheme
- type Deleter
- type Getter
- type InternalServerError
- type Lister
- type NotIdentifiableStaticResource
- type Patcher
- type Poster
- type Putter
- type ResourceService
- func (rs *ResourceService) Delete(c *gin.Context)
- func (rs *ResourceService) Get(c *gin.Context)
- func (rs *ResourceService) List(c *gin.Context)
- func (rs *ResourceService) Patch(c *gin.Context)
- func (rs *ResourceService) Path() string
- func (rs *ResourceService) Post(c *gin.Context)
- func (rs *ResourceService) Put(c *gin.Context)
- func (rs *ResourceService) Search(c *gin.Context)
- type Searcher
- type Service
- type StaticResourceService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authentication ¶
func Authentication(authenticationType string) gin.HandlerFunc
Authentication is a gin middleware supporting multiple authentication schemes
func Get ¶
func Get(spc *core.ServiceProviderConfig) *gin.Engine
Get setups endpoints as dictated by RFC 7644
func MethodNotImplemented ¶
func MethodNotImplemented(notSupportedMethods []string) gin.HandlerFunc
MethodNotImplemented is a gin middleware responsible to abort requests which method is not supported.
func Scim2 ¶
func Scim2(group *gin.RouterGroup, resource Service)
Scim2 defines the routes as per RFC 7644
POST /endpoint GET /endpoint POST /endpoint/.search GET /endpoint/:id PUT /endpoint/:id PATCH /endpoint/:id DELETE /endpoint/:id
func Set ¶
func Set(key string, val interface{}) gin.HandlerFunc
Set is a middleware to store a value by key within the context
func Status ¶
func Status(code int) gin.HandlerFunc
Status is a gin middleware forcing the abortion of a request with the given code
Types ¶
type AuthenticationScheme ¶
type AuthenticationScheme int
AuthenticationScheme ...
const ( // OAuth identifies ... OAuth AuthenticationScheme = iota // OAuth2 identifies ... OAuth2 // OAuthBearerToken identifies ... OAuthBearerToken // HTTPBasic identifies ... HTTPBasic // HTTPDigest identifies ... HTTPDigest )
func (AuthenticationScheme) String ¶
func (i AuthenticationScheme) String() string
type InternalServerError ¶
type InternalServerError struct {
// contains filtered or unexported fields
}
InternalServerError is a generic server error
func (InternalServerError) Error ¶
func (e InternalServerError) Error() string
type NotIdentifiableStaticResource ¶
type NotIdentifiableStaticResource struct { Service Lister // contains filtered or unexported fields }
NotIdentifiableStaticResource describers ...
func NewNotIdentifiableStaticResourceService ¶
func NewNotIdentifiableStaticResourceService(endpoint string, resource interface{}) *NotIdentifiableStaticResource
NewNotIdentifiableStaticResourceService creates a new `NotIdentifiableStaticResource` given a path and a resource
func (*NotIdentifiableStaticResource) List ¶
func (rs *NotIdentifiableStaticResource) List(c *gin.Context)
List ...
func (*NotIdentifiableStaticResource) Path ¶
func (rs *NotIdentifiableStaticResource) Path() string
Path returns the endpoint of the `NotIdentifiableStaticResource`
type ResourceService ¶
type ResourceService struct { Service Lister Getter Putter Patcher Deleter Searcher // contains filtered or unexported fields }
ResourceService describes ...
func NewResourceService ¶
func NewResourceService(rt core.ResourceType) *ResourceService
NewResourceService creates a new `ResourceService` for the given `core.ResourceTyper`
func (*ResourceService) Path ¶
func (rs *ResourceService) Path() string
Path returns the endpoint of the `ResourceService`
type StaticResourceService ¶
type StaticResourceService struct { Service Lister Getter // contains filtered or unexported fields }
StaticResourceService describers ...
func NewStaticResourceService ¶
func NewStaticResourceService(endpoint string, resources interface{}) *StaticResourceService
NewStaticResourceService creates a new `StaticResourceService` given a path and a list of `core.ResourceTyper`
func (*StaticResourceService) Path ¶
func (rs *StaticResourceService) Path() string
Path returns the endpoint of the `StaticResourceService`