Documentation ¶
Index ¶
- Variables
- func Catch(f func()) (r interface{})
- func Check(e error)
- func DenatureObject(data interface{}) map[string]interface{}
- func GetField(i interface{}, field string) interface{}
- func GetFieldByTag(ider interface{}, realtag string) (reflect.Value, reflect.StructField)
- func GetId(ider interface{}) string
- func GetIdField(ider interface{}) (reflect.Value, reflect.StructField)
- func IsZeroOfUnderlyingType(x interface{}) bool
- func Reply(a interface{})
- func SetField(field string, i interface{}, v interface{})
- func SetId(ider interface{}, id string) error
- type API
- func (a *API) CentralFindRouter(r *Request, resourcestr, idstr string, preroute []string, ...)
- func (a *API) EntryCreate(r *Request)
- func (a *API) EntryDelete(r *Request)
- func (a *API) EntryFindDefault(r *Request)
- func (a *API) EntryFindRecordByResourceAndId(r *Request)
- func (a *API) EntryFindRelationshipByNameAndResourceId(r *Request)
- func (a *API) EntryFindRelationshipsByResourceId(r *Request)
- func (a *API) EntryUpdate(r *Request)
- func (a *API) GetRelationship(srcR, linkName string) *APIMountedRelationship
- func (a *API) GetRelationshipsByResource(resource string) map[string]*APIMountedRelationship
- func (a *API) GetResource(name string) *APIMountedResource
- func (a *API) InitRouter()
- func (a *API) MountRelationship(name, srcResourceName, dstResourceName string, relationship Relationship, ...)
- func (a *API) MountResource(name string, resource Resource, authenticators ...Authenticator)
- func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (a *API) Wrap(child func(r *Request)) httprouter.Handle
- type APIMountedRelationship
- type APIMountedResource
- type Authenticator
- type AuthenticatorMany
- type Denaturer
- type Done
- type ExecutableFuture
- func (ef *ExecutableFuture) Build(amr *APIMountedResource) *FutureOutput
- func (ef *ExecutableFuture) CatchPanic()
- func (ef *ExecutableFuture) Defer()
- func (ef *ExecutableFuture) Execute()
- func (ef *ExecutableFuture) GetRequest() *FutureRequest
- func (ef *ExecutableFuture) Go(f func())
- func (ef *ExecutableFuture) HandleRequest(req *FutureRequest, cb func(*FutureResponse))
- func (ef *ExecutableFuture) HandleResponse(res *FutureResponse)
- func (ef *ExecutableFuture) Optimize()
- func (ef *ExecutableFuture) PushChild(r Relationship, f *ExecutableFuture)
- func (ef *ExecutableFuture) Takeover(fr *FutureRequest)
- type Field
- type Future
- type FutureOutput
- type FutureOutputDelete
- type FutureRequest
- type FutureRequestKind
- type FutureRequestKindDeleteByIds
- type FutureRequestKindFailure
- type FutureRequestKindFindByAnyFields
- type FutureRequestKindFindByIds
- type FutureRequestKindIdentity
- type FutureRequestedPanic
- type FutureResponse
- type FutureResponseKind
- type FutureResponseKindByFields
- type FutureResponseKindDeleted
- type FutureResponseKindWithRecords
- type Ider
- type IncludeInstructions
- type LeasedPromise
- type Logger
- type LoggerDefault
- func (l *LoggerDefault) Criticalf(format string, args ...interface{})
- func (l *LoggerDefault) Debugf(format string, args ...interface{})
- func (l *LoggerDefault) Errorf(format string, args ...interface{})
- func (l *LoggerDefault) GetCaller(depth int) string
- func (l *LoggerDefault) GetTime() string
- func (l *LoggerDefault) Infof(format string, args ...interface{})
- func (l *LoggerDefault) PrepareArgs(args []interface{}) []interface{}
- func (l *LoggerDefault) Warnf(format string, args ...interface{})
- type OData
- type OError
- type OErrorSource
- type OMeta
- type ORecords
- type ORelationship
- type ORelationships
- type OResourceIdentifier
- type Output
- type OutputType
- type Paginator
- type Promise
- type PromiseStorage
- type PromiseStorageLease
- type Record
- type RecordAttributes
- type RecordParserSimple
- type Relationship
- type RelationshipIdentity
- func (ri *RelationshipIdentity) IsSingle() bool
- func (ri *RelationshipIdentity) Link(r *Request, src, dst *ExecutableFuture, input FutureResponseKind) (output FutureRequestKind)
- func (ri *RelationshipIdentity) PostMount(a *API)
- func (ri *RelationshipIdentity) PushBackRelationships(r *Request, src, dst *ExecutableFuture, input, output FutureResponseKind)
- type RelationshipRequirement
- type Request
- func (r *Request) CatchPanic()
- func (r *Request) Defer()
- func (r *Request) Failure()
- func (r *Request) GetBaseURL() string
- func (r *Request) HandlePanic(raw interface{})
- func (r *Request) InternalHandlePanic(raw interface{}) (re Responder, is_valid bool)
- func (r *Request) Respond(re Responder)
- func (r *Request) ResponderWorker()
- func (r *Request) Send(obj interface{})
- func (r *Request) Success()
- type RequestParams
- type Resource
- type Responder
- type ResponderBase
- func InsufficientPermissions() *ResponderBase
- func NewResponderBase(status int, o *Output) *ResponderBase
- func NewResponderBaseErrors(code int, es ...error) *ResponderBase
- func NewResponderErrorOperationNotSupported(desc string) *ResponderBase
- func NewResponderErrorRelationshipDoesNotExist(relname string) *ResponderBase
- func NewResponderErrorResourceDoesNotExist(relname string) *ResponderBase
- func NewResponderForbidden(e error) *ResponderBase
- func NewResponderRecordCreate(resource_str string, rec *Record, err error) *ResponderBase
- func NewResponderResourceSuccessfullyDeleted() *ResponderBase
- func NewResponderUnimplemented(e error) *ResponderBase
- func TODO() *ResponderBase
- func Unimplemented() *ResponderBase
- type RunResponder
Constants ¶
This section is empty.
Variables ¶
var FutureOutputTimeout time.Duration = 10 * time.Second
Functions ¶
func Catch ¶
func Catch(f func()) (r interface{})
* Catch() functions similarly to most other languages try-catch... If a panic is thrown within the provided lambda, it will be intercepted and returned as an argument. If no error occurs, the return is nil.
func DenatureObject ¶
func DenatureObject(data interface{}) map[string]interface{}
func GetFieldByTag ¶
func GetFieldByTag(ider interface{}, realtag string) (reflect.Value, reflect.StructField)
func GetIdField ¶
func GetIdField(ider interface{}) (reflect.Value, reflect.StructField)
func IsZeroOfUnderlyingType ¶
func IsZeroOfUnderlyingType(x interface{}) bool
Types ¶
type API ¶
type API struct { Resources map[string]*APIMountedResource Relationships map[string]map[string]*APIMountedRelationship DefaultResourceWrapper func(*APIMountedResource) Router *httprouter.Router BaseURI string Logger Logger }
*
- API is the primary user-facing structure within this framework. It
- provides all of the functionality needed to intialize this framework,
- as well as all of the glue to step down into more specific functionality
func (*API) CentralFindRouter ¶
func (a *API) CentralFindRouter(r *Request, resourcestr, idstr string, preroute []string, outputtype OutputType)
func (*API) EntryCreate ¶
func (*API) EntryDelete ¶
func (*API) EntryFindDefault ¶
func (*API) EntryFindRecordByResourceAndId ¶
func (*API) EntryFindRelationshipByNameAndResourceId ¶
func (*API) EntryFindRelationshipsByResourceId ¶
func (*API) EntryUpdate ¶
func (*API) GetRelationship ¶
func (a *API) GetRelationship(srcR, linkName string) *APIMountedRelationship
* GetRelationship() will return a single relationship for a given resource string and relationship string. If the resource or relationship does not exist, this function returns a nil pointer.
func (*API) GetRelationshipsByResource ¶
func (a *API) GetRelationshipsByResource(resource string) map[string]*APIMountedRelationship
* GetRelationshipsByResource() will return a list of all of the relationships that the given resource string can link to.
func (*API) GetResource ¶
func (a *API) GetResource(name string) *APIMountedResource
* GetResource() will return the resource for a given resource string. If the resource does not exist, this function returns a nil pointer.
func (*API) InitRouter ¶
func (a *API) InitRouter()
* InitRouter() prepares the internal httprouter object with all of the desired routes. This is called automatically. You should never have to call this unless you wish to muck around with the httprouter
func (*API) MountRelationship ¶
func (a *API) MountRelationship(name, srcResourceName, dstResourceName string, relationship Relationship, authenticators ...Authenticator)
* MountRelationship() will take a given Relationship and make it available for requests sent to the given API. This also requires providing a source and destination Resource string. These resources must have already been mounted with MountResource() or this function will panic.
func (*API) MountResource ¶
func (a *API) MountResource(name string, resource Resource, authenticators ...Authenticator)
* MountResource() will take a given Resource and make it available for requests sent to the given API. Any Resource that is accessible goes through this function
func (*API) ServeHTTP ¶
func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)
* ServeHTTP() is to satisfy net/http.Handler -- all requests are simply forwarded through to httprouter
func (*API) Wrap ¶
func (a *API) Wrap(child func(r *Request)) httprouter.Handle
* Wrap() reroutes a request to a standard httprouter.Handler (? double check) and converts it to the function signature that our entrypoint functions expect. It also initializes our panic handling and our thread pool handling.
type APIMountedRelationship ¶
type APIMountedRelationship struct { SrcResourceName string DstResourceName string Name string Relationship Authenticator }
type APIMountedResource ¶
type APIMountedResource struct { Name string Resource Authenticator }
type Authenticator ¶
type AuthenticatorMany ¶
type AuthenticatorMany struct {
Authenticators []Authenticator
}
func NewAuthenticatorMany ¶
func NewAuthenticatorMany(authenticators ...Authenticator) *AuthenticatorMany
func (*AuthenticatorMany) Authenticate ¶
func (am *AuthenticatorMany) Authenticate(r *Request, permission, id string)
type ExecutableFuture ¶
type ExecutableFuture struct { Future Request *Request Children map[Relationship]*ExecutableFuture Input chan *FutureRequest //Relationships map[Relationship]*ExecutableFuture ResponsibleFor []*ExecutableFuture Resource *APIMountedResource Relationship *APIMountedRelationship }
ExecutableFuture.Children and ExecutableFuture.Relationships must be disjoint sets
func NewExecutableFuture ¶
func NewExecutableFuture(r *Request, f Future) *ExecutableFuture
func (*ExecutableFuture) Build ¶
func (ef *ExecutableFuture) Build(amr *APIMountedResource) *FutureOutput
func (*ExecutableFuture) CatchPanic ¶
func (ef *ExecutableFuture) CatchPanic()
func (*ExecutableFuture) Defer ¶
func (ef *ExecutableFuture) Defer()
func (*ExecutableFuture) Execute ¶
func (ef *ExecutableFuture) Execute()
func (*ExecutableFuture) GetRequest ¶
func (ef *ExecutableFuture) GetRequest() *FutureRequest
func (*ExecutableFuture) Go ¶
func (ef *ExecutableFuture) Go(f func())
func (*ExecutableFuture) HandleRequest ¶
func (ef *ExecutableFuture) HandleRequest(req *FutureRequest, cb func(*FutureResponse))
func (*ExecutableFuture) HandleResponse ¶
func (ef *ExecutableFuture) HandleResponse(res *FutureResponse)
func (*ExecutableFuture) Optimize ¶
func (ef *ExecutableFuture) Optimize()
func (*ExecutableFuture) PushChild ¶
func (ef *ExecutableFuture) PushChild(r Relationship, f *ExecutableFuture)
func (*ExecutableFuture) Takeover ¶
func (ef *ExecutableFuture) Takeover(fr *FutureRequest)
type Future ¶
type Future interface { ShouldCombine(Future) bool Combine(Future) error Work(ef *ExecutableFuture) }
type FutureOutput ¶
type FutureOutput struct { Parents []*ExecutableFuture PrimaryData Future PrimaryDataType OutputType }
func (*FutureOutput) Combine ¶
func (fo *FutureOutput) Combine(f Future) error
func (*FutureOutput) PushParent ¶
func (fo *FutureOutput) PushParent(ef *ExecutableFuture)
func (*FutureOutput) ShouldCombine ¶
func (fo *FutureOutput) ShouldCombine(f Future) bool
func (*FutureOutput) Work ¶
func (fo *FutureOutput) Work(pf *ExecutableFuture)
type FutureOutputDelete ¶
type FutureOutputDelete struct{}
func (*FutureOutputDelete) Combine ¶
func (fo *FutureOutputDelete) Combine(f Future) error
func (*FutureOutputDelete) ShouldCombine ¶
func (fo *FutureOutputDelete) ShouldCombine(f Future) bool
func (*FutureOutputDelete) Work ¶
func (fo *FutureOutputDelete) Work(pf *ExecutableFuture)
type FutureRequest ¶
type FutureRequest struct { Request *Request Response chan *FutureResponse Kind FutureRequestKind }
func NewFutureRequest ¶
func NewFutureRequest(r *Request, kind FutureRequestKind) *FutureRequest
func (*FutureRequest) GetResponse ¶
func (fr *FutureRequest) GetResponse() (res *FutureResponse)
func (*FutureRequest) SendResponse ¶
func (fr *FutureRequest) SendResponse(res *FutureResponse)
type FutureRequestKind ¶
type FutureRequestKind interface{}
type FutureRequestKindDeleteByIds ¶
type FutureRequestKindDeleteByIds struct {
Ids []string
}
type FutureRequestKindFailure ¶
type FutureRequestKindFailure struct {
Response *FutureResponse
}
type FutureRequestKindFindByAnyFields ¶
type FutureRequestKindFindByAnyFields struct {
Fields []Field
}
type FutureRequestKindFindByIds ¶
type FutureRequestKindFindByIds struct {
Ids []string
}
type FutureRequestKindIdentity ¶
type FutureRequestKindIdentity struct { Response FutureResponseKind Future }
type FutureRequestedPanic ¶
type FutureRequestedPanic struct{}
type FutureResponse ¶
type FutureResponse struct { IsSuccess bool Success map[Future]FutureResponseKind Failure []OError WaitForComplete chan bool }
type FutureResponseKind ¶
type FutureResponseKind interface { }
type FutureResponseKindByFields ¶
func (*FutureResponseKindByFields) GetIsSingle ¶
func (frkbf *FutureResponseKindByFields) GetIsSingle() bool
func (*FutureResponseKindByFields) GetRecords ¶
func (frkbf *FutureResponseKindByFields) GetRecords() []*Record
type FutureResponseKindDeleted ¶
type FutureResponseKindDeleted struct { }
type IncludeInstructions ¶
type IncludeInstructions struct { Children map[string]*IncludeInstructions Include []string Parent *IncludeInstructions }
func NewIncludeInstructions ¶
func NewIncludeInstructions(rawinst string) *IncludeInstructions
func NewIncludeInstructionsEmpty ¶
func NewIncludeInstructionsEmpty() *IncludeInstructions
func NewIncludeInstructionsFromRequest ¶
func NewIncludeInstructionsFromRequest(r *http.Request) *IncludeInstructions
func (*IncludeInstructions) GetChild ¶
func (ii *IncludeInstructions) GetChild(childname string) *IncludeInstructions
func (*IncludeInstructions) Push ¶
func (ii *IncludeInstructions) Push(inst_rels []string)
func (*IncludeInstructions) ShouldFetch ¶
func (ii *IncludeInstructions) ShouldFetch(rel string) bool
func (*IncludeInstructions) ShouldInclude ¶
func (ii *IncludeInstructions) ShouldInclude(inst string) bool
type LeasedPromise ¶
func (*LeasedPromise) Release ¶
func (sp *LeasedPromise) Release()
type LoggerDefault ¶
func NewLoggerDefault ¶
func NewLoggerDefault(output io.Writer) *LoggerDefault
func (*LoggerDefault) Criticalf ¶
func (l *LoggerDefault) Criticalf(format string, args ...interface{})
func (*LoggerDefault) Debugf ¶
func (l *LoggerDefault) Debugf(format string, args ...interface{})
func (*LoggerDefault) Errorf ¶
func (l *LoggerDefault) Errorf(format string, args ...interface{})
func (*LoggerDefault) GetCaller ¶
func (l *LoggerDefault) GetCaller(depth int) string
func (*LoggerDefault) GetTime ¶
func (l *LoggerDefault) GetTime() string
func (*LoggerDefault) Infof ¶
func (l *LoggerDefault) Infof(format string, args ...interface{})
func (*LoggerDefault) PrepareArgs ¶
func (l *LoggerDefault) PrepareArgs(args []interface{}) []interface{}
func (*LoggerDefault) Warnf ¶
func (l *LoggerDefault) Warnf(format string, args ...interface{})
type OData ¶
type OData interface{}
OData is an interface used to represent the various forms of the primary data in the Output object. Currently, OutputData is an empty interface, so the use of this is purely syntactical. As of writing, the objects written in this file alongside OutputData are intended to be used as OutputData.
type OError ¶
type OError struct { Id string `json:"id,omitempty"` Href string `json:"href,omitempty"` Status string `json:"status,omitempty"` Code string `json:"code,omitempty"` Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Source *OErrorSource `json:"source,omitempty"` Meta interface{} `json:"meta,omitempty"` }
func ErrorToOError ¶
type OErrorSource ¶
type ORecords ¶
ORecords is a struct that satisfies OData, and represents a list of potentially many Records. A list of zero records is possible. Attempting to encode this object as JSON with a list of more than one Record when IsSingle = true will cause a panic.
func (ORecords) MarshalJSON ¶
type ORelationship ¶
type ORelationship struct { IsSingle bool `json:"-"` //Links OLinks `json:"links,omitempty"` Data []OResourceIdentifier `json:"data"` RelationshipWasFetched bool Meta OMeta `json:"meta,omitempty"` RelatedBase string `json:"-"` RelationshipName string `json:"-"` }
func (*ORelationship) MarshalJSON ¶
func (o *ORelationship) MarshalJSON() ([]byte, error)
type ORelationships ¶
type ORelationships struct {
Relationships []*ORelationship
}
func (*ORelationships) GetRelationshipByName ¶
func (o *ORelationships) GetRelationshipByName(name string) *ORelationship
func (*ORelationships) MarshalJSON ¶
func (o *ORelationships) MarshalJSON() ([]byte, error)
type OResourceIdentifier ¶
func GetRelationshipDifferences ¶
func GetRelationshipDifferences(src, dst []OResourceIdentifier) (add, remove []OResourceIdentifier)
func GetResourceIdentifiers ¶
func GetResourceIdentifiers(records []*Record) (out []OResourceIdentifier)
func NewResourceIdentifier ¶
func NewResourceIdentifier(id, typ string) OResourceIdentifier
type Output ¶
type Output struct { Data OData `json:"data,omitempty"` //Links *OutputLinks `json:"links, omitempty"` Included []*Record `json:"included,omitempty"` Errors []OError `json:"errors,omitempty"` Meta OMeta `json:"meta,omitempty"` }
* Output is the primary output structure used by this framework. It is responsible for representing the root node of every spec-compliant response this framework can generate.
type OutputType ¶
type OutputType int
const ( OutputTypeResources OutputType = iota OutputTypeLinkages )
type Paginator ¶
func NewPaginator ¶
type PromiseStorage ¶
type PromiseStorage struct { Promises map[reflect.Type]chan PromiseStorageLease ChanGet chan PromiseStorageLease }
func NewPromiseStorage ¶
func NewPromiseStorage() *PromiseStorage
func (*PromiseStorage) Defer ¶
func (ps *PromiseStorage) Defer()
func (*PromiseStorage) Get ¶
func (ps *PromiseStorage) Get(typ Promise, init func() Promise) LeasedPromise
func (*PromiseStorage) PromiseWorker ¶
func (ps *PromiseStorage) PromiseWorker(p Promise) chan PromiseStorageLease
func (*PromiseStorage) Worker ¶
func (ps *PromiseStorage) Worker()
type PromiseStorageLease ¶
type PromiseStorageLease struct { Type reflect.Type Initialize func() Promise ChanResponse chan LeasedPromise }
type Record ¶
type Record struct { // exposed fields Type string `json:"type"` Id string `json:"id"` Attributes RecordAttributes `json:"attributes,omitempty"` //Links //TODO Relationships *ORelationships `json:"relationships,omitempty"` Meta OMeta `json:"meta,omitempty"` // internal fields for tracking ShouldInclude bool `json:"-"` }
func ConvertInterfaceSliceToRecordSlice ¶
func ConvertInterfaceSliceToRecordSlice(src interface{}) []*Record
func (*Record) GetResourceIdentifier ¶
func (r *Record) GetResourceIdentifier() OResourceIdentifier
func (*Record) HasFieldValue ¶
func (*Record) PushRelationship ¶
func (r *Record) PushRelationship(rel *ORelationship)
type RecordAttributes ¶
type RecordAttributes interface{}
type RecordParserSimple ¶
type RecordParserSimple struct {
Data *Record `json:"data"`
}
type Relationship ¶
type Relationship interface { IsSingle() bool PostMount(a *API) //VerifyLinks(r *Request, rec *Record, amr *APIMountedRelationship, rids []OResourceIdentifier) error //PreSave(r *Request, rec *Record, amr *APIMountedRelationship, rids []OResourceIdentifier) error //PostSave(r *Request, rec *Record, amr *APIMountedRelationship, rids []OResourceIdentifier) error //GetTargetFuture() Future Link(r *Request, src, dst *ExecutableFuture, input FutureResponseKind) (output FutureRequestKind) PushBackRelationships(r *Request, src, dst *ExecutableFuture, srcrk, dstrk FutureResponseKind) }
RelationshipBehavior is a "base interface" children: IdRelationshipBehavior or a HasIdRelationshipBehavior
type RelationshipIdentity ¶
type RelationshipIdentity struct {
IsPrimary bool
}
func (*RelationshipIdentity) IsSingle ¶
func (ri *RelationshipIdentity) IsSingle() bool
func (*RelationshipIdentity) Link ¶
func (ri *RelationshipIdentity) Link(r *Request, src, dst *ExecutableFuture, input FutureResponseKind) (output FutureRequestKind)
func (*RelationshipIdentity) PostMount ¶
func (ri *RelationshipIdentity) PostMount(a *API)
func (*RelationshipIdentity) PushBackRelationships ¶
func (ri *RelationshipIdentity) PushBackRelationships(r *Request, src, dst *ExecutableFuture, input, output FutureResponseKind)
type RelationshipRequirement ¶
type RelationshipRequirement int
const ( Required RelationshipRequirement = iota NotRequired )
type Request ¶
type Request struct { HttpRequest *http.Request HttpResponseWriter http.ResponseWriter API *API Params httprouter.Params IncludeInstructions *IncludeInstructions PromiseStorage *PromiseStorage Done *Done Responder chan *RunResponder // contains filtered or unexported fields }
* Request is responsible for managing all of the common information between resources and relationships for the duration of a request. It contains references to often-needed components such as the raw net/http.Request, the API object, etc
func NewRequest ¶
func NewRequest(a *API, httpreq *http.Request, httpres http.ResponseWriter, params httprouter.Params) *Request
* NewRequest() will return a populated instance of *Request. It will also initialize concurrency components.
func (*Request) CatchPanic ¶
func (r *Request) CatchPanic()
func (*Request) Defer ¶
func (r *Request) Defer()
* Defer() should be called in a defer call at the same point that a Request is initialized. It is responsible for the safe handling of responses
func (*Request) Failure ¶
func (r *Request) Failure()
* Failure() is responsible for calling the appropriate failure handles. This function should never be called outside of a Responder
func (*Request) GetBaseURL ¶
* GetBaseURL() will provide the URL + URI for any arbitrary request such that curling the output of this function is the root API endpoint for requests to this instance of this framework.
func (*Request) HandlePanic ¶
func (r *Request) HandlePanic(raw interface{})
* HandlePanic() is responsible for interpreting the object that was paniced, and replying with the appropriate answer.
func (*Request) InternalHandlePanic ¶
func (*Request) ResponderWorker ¶
func (r *Request) ResponderWorker()
type RequestParams ¶
type RequestParams struct {
Paginator Paginator
}
type ResponderBase ¶
type ResponderBase struct { Output *Output Status int Headers map[string][]string CB func(r *Request) }
func InsufficientPermissions ¶
func InsufficientPermissions() *ResponderBase
func NewResponderBase ¶
func NewResponderBase(status int, o *Output) *ResponderBase
func NewResponderBaseErrors ¶
func NewResponderBaseErrors(code int, es ...error) *ResponderBase
func NewResponderErrorOperationNotSupported ¶
func NewResponderErrorOperationNotSupported(desc string) *ResponderBase
func NewResponderErrorRelationshipDoesNotExist ¶
func NewResponderErrorRelationshipDoesNotExist(relname string) *ResponderBase
func NewResponderErrorResourceDoesNotExist ¶
func NewResponderErrorResourceDoesNotExist(relname string) *ResponderBase
func NewResponderForbidden ¶
func NewResponderForbidden(e error) *ResponderBase
func NewResponderRecordCreate ¶
func NewResponderRecordCreate(resource_str string, rec *Record, err error) *ResponderBase
TODO: rip this out and replace it with multiple responder functions... this function should not be internally resonsible for determining success or failure
func NewResponderResourceSuccessfullyDeleted ¶
func NewResponderResourceSuccessfullyDeleted() *ResponderBase
func NewResponderUnimplemented ¶
func NewResponderUnimplemented(e error) *ResponderBase
func TODO ¶
func TODO() *ResponderBase
func Unimplemented ¶
func Unimplemented() *ResponderBase
func (*ResponderBase) PushHeader ¶
func (rb *ResponderBase) PushHeader(k, v string)
func (*ResponderBase) Respond ¶
func (rb *ResponderBase) Respond(r *Request) error
type RunResponder ¶
Source Files ¶
- API.go
- APIEntrypoints.go
- APIMountedRelationship.go
- APIMountedResource.go
- Authenticator.go
- AuthenticatorMany.go
- DenatureObject.go
- Future.go
- FutureList.go
- FutureOutput.go
- FutureOutputDelete.go
- FutureRequest.go
- FutureRequestKinds.go
- FutureResponse.go
- FutureResponseKinds.go
- Ider.go
- IncludeInstructions.go
- Logger.go
- LoggerDefault.go
- Output.go
- OutputData.go
- OutputError.go
- OutputType.go
- Paginator.go
- Promise.go
- PromiseStorage.go
- Record.go
- RecordParserSimple.go
- Relationship.go
- RelationshipIdentity.go
- Request.go
- Resource.go
- Responder.go
- ResponderBase.go
- ResponderHelpers.go
- util.go