Skip to content

Commit

Permalink
fix(dispatch): Comments clarifying Methods and Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Mar 19, 2021
1 parent 7d8d599 commit 33222c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ type Cursor interface{}
// 3: (output, Cursor, error)
// The implementation should have the same input and output as the method, except
// with the context.Context replaced by a scope.
// No other functions are allowed to be defined, other that those that are going to
// be registered (as described above) and those that are required by the interface.
type MethodSet interface {
Name() string
Attributes() map[string]AttributeSet
}

// AttributeSet is extra information about each method, such as: http endpoint,
// http verb, (TODO) permissions, and (TODO) other metadata
// Each method is required to have associated attributes in order to successfully register
type AttributeSet struct {
endpoint APIEndpoint
verb string
Expand Down

0 comments on commit 33222c6

Please sign in to comment.