Documentation
¶
Overview ¶
Package directory provides the canonical ODP Service directory client.
Index ¶
- type Client
- func (client *Client) Environment() Environment
- func (client *Client) SearchPages(ctx context.Context, request SearchRequest, options IterationOptions) iter.Seq2[SearchPage, error]
- func (client *Client) SearchServices(ctx context.Context, request SearchRequest, options IterationOptions) iter.Seq2[Service, error]
- func (client *Client) SuggestServices(ctx context.Context, request SuggestionRequest) ([]string, error)
- type Environment
- type Facet
- type Facets
- type IterationOptions
- type OperationFilter
- type Options
- type PaymentFilter
- type PaymentOptionFacetValue
- type RequestError
- type SearchPage
- type SearchRequest
- type Service
- type ServiceFilters
- type SuggestionRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Environment ¶
func (client *Client) Environment() Environment
func (*Client) SearchPages ¶
func (client *Client) SearchPages(ctx context.Context, request SearchRequest, options IterationOptions) iter.Seq2[SearchPage, error]
func (*Client) SearchServices ¶
func (client *Client) SearchServices(ctx context.Context, request SearchRequest, options IterationOptions) iter.Seq2[Service, error]
func (*Client) SuggestServices ¶
type Environment ¶
type Environment string
const ( Production Environment = "production" Sandbox Environment = "sandbox" )
type Facets ¶
type Facets struct {
Enrollment []Facet[odp.EnrollmentProtocol]
Keywords []Facet[string]
Operations []Facet[odp.OperationDescriptor]
PaymentOptions []Facet[PaymentOptionFacetValue]
Payments []Facet[odp.PaymentProtocol]
}
type IterationOptions ¶
type OperationFilter ¶ added in v0.2.0
type OperationFilter struct {
Authentication odp.AuthenticationRequirement `json:"authentication,omitempty"`
Name odp.Operation `json:"name"`
}
type Options ¶
type Options struct {
Environment Environment
HTTPClient *http.Client
}
type PaymentFilter ¶ added in v0.2.0
type PaymentFilter struct {
Authentication odp.AuthenticationRequirement `json:"authentication,omitempty"`
Name odp.Protocol `json:"name"`
Options []odp.PaymentOption `json:"options,omitempty"`
}
type PaymentOptionFacetValue ¶ added in v0.3.2
type PaymentOptionFacetValue struct {
Name odp.Protocol `json:"name"`
Option odp.PaymentOption `json:"option"`
}
type RequestError ¶
func (*RequestError) Error ¶
func (err *RequestError) Error() string
type SearchPage ¶
type SearchPage struct {
Additional odp.AdditionalMembers
Facets *Facets
Items []Service
Next string
}
type SearchRequest ¶
type SearchRequest struct {
Filters *ServiceFilters `json:"filters,omitempty"`
Limit int `json:"limit,omitempty"`
Query string `json:"query,omitempty"`
}
type Service ¶
type Service struct {
Additional odp.AdditionalMembers
Description string
IndexedAt time.Time
Keywords []string
Language string
Localizations []string
Name string
Operations []odp.OperationDescriptor
Protocols *odp.ServiceProtocols
ServiceOrigin string
}
type ServiceFilters ¶
type ServiceFilters struct {
Enrollment []odp.EnrollmentProtocol `json:"enrollment,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Operations []OperationFilter `json:"operations,omitempty"`
Payments []PaymentFilter `json:"payments,omitempty"`
}
type SuggestionRequest ¶
Click to show internal directories.
Click to hide internal directories.