Documentation ¶
Index ¶
- func RegisterNamespaceService(server *otohttp.Server, namespaceService NamespaceService)
- type DeleteNamespaceRequest
- type DeleteNamespaceResponse
- type GetNamespaceRequest
- type GetNamespaceResponse
- type NamespaceService
- type PutNamespaceRequest
- type PutNamespaceResponse
- type SearchNamespaceRequest
- type SearchNamespaceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterNamespaceService ¶
func RegisterNamespaceService(server *otohttp.Server, namespaceService NamespaceService)
Register adds the NamespaceService to the otohttp.Server.
Types ¶
type DeleteNamespaceRequest ¶
type DeleteNamespaceRequest struct { // ID is the unique identifier of a Namespace ID string `json:"id"` }
DeleteNamespaceRequest is the input object for NamespaceService.DeleteNamespace
type DeleteNamespaceResponse ¶
type DeleteNamespaceResponse struct { // Error is string explaining what went wrong. Empty if everything was fine. Error string `json:"error,omitempty"` }
DeleteNamespaceRequest is the output object for NamespaceService.DeleteNamespace
type GetNamespaceRequest ¶
type GetNamespaceRequest struct { // ID is the unique identifier of the namespace ID string `json:"id"` }
GetNamespaceRequest is the input object for GetNamespaceService.GetNamespace
type GetNamespaceResponse ¶
type GetNamespaceResponse struct { // Namespace is the Namespace Namespace *domain.Namespace `json:"namespace"` // Error is string explaining what went wrong. Empty if everything was fine. Error string `json:"error,omitempty"` }
GetNamespaceResponse is the output object for GetNamespaceService.GetNamespace
type NamespaceService ¶
type NamespaceService interface { // DeletetNamespace deletes a Namespace DeleteNamespace(context.Context, DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) // GetNamespace gets a Namespace GetNamespace(context.Context, GetNamespaceRequest) (*GetNamespaceResponse, error) // PutNamespace stores a Namespace PutNamespace(context.Context, PutNamespaceRequest) (*PutNamespaceResponse, error) // Search returns a filtered list of Namespaces Search(context.Context, SearchNamespaceRequest) (*SearchNamespaceResponse, error) }
NamespaceService allows you to programmatically manage namespaces
type PutNamespaceRequest ¶
PutNamespaceRequest is the input object for NamespaceService.PutNamespace
type PutNamespaceResponse ¶
type PutNamespaceResponse struct { // Error is string explaining what went wrong. Empty if everything was fine. Error string `json:"error,omitempty"` }
PutNamespaceResponse is the output object for NamespaceService.PutNamespace
type SearchNamespaceRequest ¶
type SearchNamespaceRequest struct { // Prefix for a Namespace Prefix string `json:"prefix"` // BaseURI for a Namespace BaseURI string `json:"baseURI"` }
SearchNamespaceRequest is the input object for NamespaceService.Search
type SearchNamespaceResponse ¶
type SearchNamespaceResponse struct { // Hits returns the list of matching Namespaces Hits []*domain.Namespace `json:"hits"` // More indicates that there may be more search results. If true, make the same // Search request passing this Cursor. More bool `json:"more"` // Error is string explaining what went wrong. Empty if everything was fine. Error string `json:"error,omitempty"` }
SearchNamespaceResponse is the output object for NamespaceService.Search