Documentation
¶
Index ¶
- func NoSecurity(err error, log contract.Logger) contract.Security
- type JSONSchema
- type NullOperation
- func (op NullOperation) Data() *contract.OperationData
- func (op NullOperation) Description() string
- func (op NullOperation) GetRequest() (*http.Request, error)
- func (op NullOperation) ID() string
- func (op NullOperation) Method() string
- func (op NullOperation) Name() string
- func (op NullOperation) Path() string
- func (op NullOperation) Resolve() contract.DataResolver
- func (op NullOperation) Result() *contract.OperationResult
- type NullSecurity
- type NullSpec
- type OperationCache
- type OperationPrototype
- type Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JSONSchema ¶
type JSONSchema map[string]interface{}
JSONSchema is an internal type to hold a JSON schema definition.
type NullOperation ¶
type NullOperation struct {
errors.NullObjectPrototype
}
NullOperation is used whenever we can't have a real one. Reports the contained error on every method call.
func NoOperation ¶
func NoOperation(err error, log contract.Logger) *NullOperation
NoOperation creates a new NullOperation instance.
func (NullOperation) Data ¶
func (op NullOperation) Data() *contract.OperationData
Data reports an error.
func (NullOperation) Description ¶
func (op NullOperation) Description() string
Description reports an error.
func (NullOperation) GetRequest ¶
func (op NullOperation) GetRequest() (*http.Request, error)
GetRequest reports an error.
func (NullOperation) Resolve ¶
func (op NullOperation) Resolve() contract.DataResolver
Resolve reports an error.
func (NullOperation) Result ¶
func (op NullOperation) Result() *contract.OperationResult
Result reports an error.
type NullSecurity ¶
type NullSecurity struct {
errors.NullObjectPrototype
}
NullSecurity is used whenever we can't have a real one. Reports the contained error on every method call.
type NullSpec ¶
type NullSpec struct {
errors.NullObjectPrototype
}
NullSpec is a placehilder spec used when we can't have a real one.
func (NullSpec) Description ¶
Description reports an error.
func (NullSpec) GetOperation ¶
GetOperation reports an error.
func (NullSpec) Operations ¶
func (spec NullSpec) Operations() contract.OperationIterator
Operations reports an error.
type OperationCache ¶
type OperationCache struct {
// contains filtered or unexported fields
}
OperationCache proxies the GetOperation method and caches returned operations.
func NewOperationCache ¶
func NewOperationCache(spec contract.OperationAccess) OperationCache
NewOperationCache creates a new OperationCache instance.
func (OperationCache) GetOperation ¶
func (cache OperationCache) GetOperation(id string) contract.Operation
GetOperation returns a previously cache operation instance, when present, otherwise gets it from the spec, caches and returns.
type OperationPrototype ¶
type OperationPrototype struct { contract.EntityTrait contract.Operation // contains filtered or unexported fields }
OperationPrototype is a prototype implementation for operations.
func NewOperationPrototype ¶
func NewOperationPrototype(log contract.Logger) *OperationPrototype
NewOperationPrototype create a new OperationPrototype instance.
func (*OperationPrototype) Data ¶
func (op *OperationPrototype) Data() *contract.OperationData
Data returns a pointer to the internal data object.
func (*OperationPrototype) GetRequest ¶
func (op *OperationPrototype) GetRequest() (*http.Request, error)
GetRequest creates an http.Request instance and prepares it to make an API request.
func (*OperationPrototype) Result ¶
func (op *OperationPrototype) Result() *contract.OperationResult
Result returns a pointer to the internal result object.