Documentation ¶
Index ¶
- Constants
- type CreateRequest
- type CreateResponse
- type CreateService
- type DeleteRequest
- type DeleteService
- type GetRequest
- type GetResponse
- type GetService
- type PatchOperation
- type PatchRequest
- type PatchResponse
- type PatchService
- type QueryRequest
- type QueryResponse
- type QueryService
- type ReplaceRequest
- type ReplaceResponse
- type ReplaceService
Constants ¶
View Source
const ( PatchOpSchema = "urn:ietf:params:scim:api:messages:2.0:PatchOp" // Patch operations OpAdd = "add" OpReplace = "replace" OpRemove = "remove" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateResponse ¶
type CreateService ¶
type CreateService struct { Logger log.Logger Filters []filter.ForResource Database db.DB Event event.Publisher }
func (*CreateService) CreateResource ¶
func (s *CreateService) CreateResource(ctx context.Context, request *CreateRequest) (cr *CreateResponse, err error)
type DeleteRequest ¶
type DeleteService ¶
type DeleteService struct { Logger log.Logger Database db.DB Event event.Publisher ServiceProviderConfig *spec.ServiceProviderConfig }
func (*DeleteService) DeleteResource ¶
func (s *DeleteService) DeleteResource(ctx context.Context, request *DeleteRequest) error
type GetRequest ¶
type GetRequest struct { *crud.Projection ResourceID string }
type GetResponse ¶
type GetService ¶
func (*GetService) GetResource ¶
func (s *GetService) GetResource(ctx context.Context, request *GetRequest) (*GetResponse, error)
type PatchOperation ¶
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value json.RawMessage `json:"value"` }
func (*PatchOperation) ParseValue ¶
func (po *PatchOperation) ParseValue(resource *prop.Resource) (interface{}, error)
type PatchRequest ¶
type PatchRequest struct { Schemas []string `json:"schemas"` Operations []PatchOperation `json:"Operations"` ResourceID string `json:"-"` MatchCriteria func(resource *prop.Resource) bool `json:"-"` }
func (*PatchRequest) Validate ¶
func (pr *PatchRequest) Validate() error
type PatchResponse ¶
type PatchService ¶
type PatchService struct { Logger log.Logger PrePatchFilters []filter.ForResource PostPatchFilters []filter.ForResource Database db.DB ServiceProviderConfig *spec.ServiceProviderConfig Event event.Publisher }
func (*PatchService) PatchResource ¶
func (s *PatchService) PatchResource(ctx context.Context, request *PatchRequest) (*PatchResponse, error)
type QueryRequest ¶
type QueryRequest struct { Filter string Sort *crud.Sort Pagination *crud.Pagination Projection *crud.Projection }
func (*QueryRequest) ValidateAndDefault ¶
func (q *QueryRequest) ValidateAndDefault() error
type QueryResponse ¶
type QueryService ¶
type QueryService struct { Logger log.Logger Database db.DB ServiceProviderConfig *spec.ServiceProviderConfig }
func (*QueryService) QueryResource ¶
func (s *QueryService) QueryResource(ctx context.Context, request *QueryRequest) (resp *QueryResponse, err error)
type ReplaceRequest ¶
type ReplaceResponse ¶
type ReplaceService ¶
type ReplaceService struct { Logger log.Logger Filters []filter.ForResource Database db.DB ServiceProviderConfig *spec.ServiceProviderConfig Event event.Publisher }
func (*ReplaceService) ReplaceResource ¶
func (s *ReplaceService) ReplaceResource(ctx context.Context, request *ReplaceRequest) (*ReplaceResponse, error)
Click to show internal directories.
Click to hide internal directories.