Documentation ¶
Index ¶
- type CreateRequest
- type CreateResponse
- type DeleteAllRequest
- type DeleteAllResponse
- type DeleteRequest
- type DeleteResponse
- type GetRequest
- type GetResponse
- type Handler
- type HandlerImpl
- func (h *HandlerImpl) Create(ctx context.Context, req CreateRequest) (*CreateResponse, error)
- func (h *HandlerImpl) Delete(ctx context.Context, req DeleteRequest) error
- func (h *HandlerImpl) DeleteAll(ctx context.Context, _ DeleteAllRequest) error
- func (h *HandlerImpl) Get(ctx context.Context, req GetRequest) (*GetResponse, error)
- func (h *HandlerImpl) List(ctx context.Context, req ListRequest) (*ListResponse, error)
- func (h *HandlerImpl) Patch(ctx context.Context, req PatchRequest) (*PatchResponse, error)
- func (h *HandlerImpl) Update(ctx context.Context, req UpdateRequest) (*UpdateResponse, error)
- type ListRequest
- type ListResponse
- type PatchRequest
- type PatchResponse
- type Server
- func (s *Server) Create(w http.ResponseWriter, r *http.Request)
- func (s *Server) Delete(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteAll(w http.ResponseWriter, r *http.Request)
- func (s *Server) Get(w http.ResponseWriter, r *http.Request)
- func (s *Server) List(w http.ResponseWriter, r *http.Request)
- func (s *Server) Patch(w http.ResponseWriter, r *http.Request)
- func (s *Server) Register(mux *http.ServeMux)
- func (s *Server) Update(w http.ResponseWriter, r *http.Request)
- type Tenant
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { ID string `json:"id,omitempty"` DisplayName string `json:"displayName,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) HasID ¶
func (lr *CreateRequest) HasID() bool
func (*CreateRequest) UnmarshalJSON ¶
func (lr *CreateRequest) UnmarshalJSON(data []byte) error
type CreateResponse ¶
type CreateResponse Tenant
type DeleteAllRequest ¶
type DeleteAllRequest struct { }
func (*DeleteAllRequest) UnmarshalFromRequest ¶
func (lr *DeleteAllRequest) UnmarshalFromRequest(r *http.Request) error
type DeleteAllResponse ¶
type DeleteAllResponse struct{}
type DeleteRequest ¶
type DeleteRequest struct {
ID string `json:"id"`
}
func (*DeleteRequest) UnmarshalFromRequest ¶
func (lr *DeleteRequest) UnmarshalFromRequest(r *http.Request) error
type DeleteResponse ¶
type DeleteResponse struct{}
type GetRequest ¶
type GetRequest struct {
ID string `json:"id"`
}
func (*GetRequest) UnmarshalFromRequest ¶
func (lr *GetRequest) UnmarshalFromRequest(r *http.Request) error
type GetResponse ¶
type GetResponse Tenant
type Handler ¶
type Handler interface { List(context.Context, ListRequest) (*ListResponse, error) Create(context.Context, CreateRequest) (*CreateResponse, error) Get(context.Context, GetRequest) (*GetResponse, error) Patch(context.Context, PatchRequest) (*PatchResponse, error) Update(context.Context, UpdateRequest) (*UpdateResponse, error) Delete(context.Context, DeleteRequest) error DeleteAll(context.Context, DeleteAllRequest) error }
func NewHandler ¶
func NewHandler() Handler
type HandlerImpl ¶
type HandlerImpl struct {
Descope *client.DescopeClient
}
func (*HandlerImpl) Create ¶
func (h *HandlerImpl) Create(ctx context.Context, req CreateRequest) (*CreateResponse, error)
func (*HandlerImpl) Delete ¶
func (h *HandlerImpl) Delete(ctx context.Context, req DeleteRequest) error
func (*HandlerImpl) DeleteAll ¶
func (h *HandlerImpl) DeleteAll(ctx context.Context, _ DeleteAllRequest) error
func (*HandlerImpl) Get ¶
func (h *HandlerImpl) Get(ctx context.Context, req GetRequest) (*GetResponse, error)
func (*HandlerImpl) List ¶
func (h *HandlerImpl) List(ctx context.Context, req ListRequest) (*ListResponse, error)
func (*HandlerImpl) Patch ¶
func (h *HandlerImpl) Patch(ctx context.Context, req PatchRequest) (*PatchResponse, error)
func (*HandlerImpl) Update ¶
func (h *HandlerImpl) Update(ctx context.Context, req UpdateRequest) (*UpdateResponse, error)
type ListRequest ¶
type ListRequest struct { Offset *uint `url:"_offset,omitempty"` Count *uint `url:"_count,omitempty"` Sort []string `url:"_sort,omitempty"` ID *string `url:"id,omitempty"` DisplayName *string `url:"displayName,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) HasDisplayName ¶
func (lr *ListRequest) HasDisplayName() bool
func (*ListRequest) HasID ¶
func (lr *ListRequest) HasID() bool
func (*ListRequest) UnmarshalFromRequest ¶
func (lr *ListRequest) UnmarshalFromRequest(r *http.Request) error
type ListResponse ¶
type PatchRequest ¶
type PatchRequest struct { ID string `json:"id"` DisplayName *string `json:"displayName,omitempty"` // contains filtered or unexported fields }
func (*PatchRequest) HasDisplayName ¶
func (lr *PatchRequest) HasDisplayName() bool
func (*PatchRequest) UnmarshalJSON ¶
func (lr *PatchRequest) UnmarshalJSON(data []byte) error
type PatchResponse ¶
type PatchResponse Tenant
type UpdateRequest ¶
type UpdateRequest struct { ID string `json:"id"` DisplayName string `json:"displayName,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) UnmarshalJSON ¶
func (lr *UpdateRequest) UnmarshalJSON(data []byte) error
type UpdateResponse ¶
type UpdateResponse Tenant
Click to show internal directories.
Click to hide internal directories.