Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMethod ¶
type CreateMethod struct {
SupportsUserSettableCreate bool
}
type DeleteMethod ¶
type DeleteMethod struct {
}
type ListMethod ¶
type ListMethod struct {
}
type PatternInfo ¶
type PatternInfo struct {
// if true, the pattern represents an individual resource,
// otherwise it represents a path to a collection of resources
IsResourcePattern bool
}
type Resource ¶
type Resource struct {
Singular string
Plural string
Parents []*Resource
Pattern []string // TOO(yft): support multiple patterns
Schema *openapi.Schema
GetMethod *GetMethod
ListMethod *ListMethod
CreateMethod *CreateMethod
UpdateMethod *UpdateMethod
DeleteMethod *DeleteMethod
}
type Service ¶
type Service struct {
ServiceDefinition
Headers map[string]string
Client *http.Client
}
func NewService ¶
func NewService(serviceDefinition ServiceDefinition, headers map[string]string) *Service
type ServiceDefinition ¶
func GetServiceDefinition ¶
func GetServiceDefinition(api *openapi.OpenAPI, serverURL, pathPrefix string) (*ServiceDefinition, error)
func (*ServiceDefinition) GetResource ¶
func (s *ServiceDefinition) GetResource(resource string) (*Resource, error)
type UpdateMethod ¶
type UpdateMethod struct {
}
Click to show internal directories.
Click to hide internal directories.