Documentation ¶
Index ¶
- Variables
- func ContentTypeOf(node state.Node) (string, error)
- func FirstNonFrameNode(node state.Node, maxDepth uint64) (state.Node, error)
- func ParseStateLink(linkValue string) (stateURI string, keypath state.Keypath, version *state.Version, _ error)
- type BlobFrame
- func (frame BlobFrame) BytesReader(rng *types.Range) (io.ReadCloser, int64, error)
- func (frame BlobFrame) BytesValue(keypath state.Keypath) ([]byte, bool, error)
- func (frame BlobFrame) ContentLength() (int64, error)
- func (frame BlobFrame) MarshalJSON() ([]byte, error)
- func (frame BlobFrame) NodeAt(keypath state.Keypath, rng *state.Range) state.Node
- func (frame BlobFrame) ParentNodeFor(keypath state.Keypath) (state.Node, state.Keypath)
- func (f BlobFrame) StringValue(keypath state.Keypath) (string, bool, error)
- type BlobResolver
- type Frame
- func (f Frame) BytesReader(rng *types.Range) (io.ReadCloser, int64, error)
- func (frame Frame) ContentLength() (int64, error)
- func (frame Frame) ContentType() string
- func (frame Frame) CopyToMemory(keypath state.Keypath, rng *state.Range) (state.Node, error)
- func (frame Frame) DebugPrint(printFn func(inFormat string, args ...interface{}), newlines bool, ...)
- func (frame Frame) MarshalJSON() ([]byte, error)
- func (frame Frame) NodeAt(keypath state.Keypath, rng *state.Range) state.Node
- func (frame Frame) ParentNodeFor(keypath state.Keypath) (state.Node, state.Keypath)
- func (frame Frame) Value(keypath state.Keypath, rng *state.Range) (interface{}, bool, error)
- type HTTPFrame
- func (frame HTTPFrame) BytesReader(rng *types.Range) (io.ReadCloser, int64, error)
- func (frame HTTPFrame) BytesValue(keypath state.Keypath) ([]byte, bool, error)
- func (frame HTTPFrame) ContentLength() (int64, error)
- func (frame HTTPFrame) MarshalJSON() ([]byte, error)
- func (frame HTTPFrame) NodeAt(keypath state.Keypath, rng *state.Range) state.Node
- func (frame HTTPFrame) ParentNodeFor(keypath state.Keypath) (state.Node, state.Keypath)
- func (frame HTTPFrame) StringValue(keypath state.Keypath) (string, bool, error)
- type HTTPResolver
- type LinkType
- type Node
- type Resolver
- type StateResolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ValueKey = state.Keypath("value") ContentTypeKey = state.Keypath("Content-Type") )
Functions ¶
func FirstNonFrameNode ¶
Recurses down through a series of Frame nodes until it finds a non-Frame node and returns it. If maxDepth is exceeded, errors.Err404 is returned.
Types ¶
type BlobFrame ¶
type BlobFrame struct { Frame // contains filtered or unexported fields }
func (BlobFrame) BytesReader ¶
func (BlobFrame) BytesValue ¶
func (BlobFrame) ContentLength ¶
func (BlobFrame) MarshalJSON ¶
func (BlobFrame) ParentNodeFor ¶
type BlobResolver ¶
type Frame ¶
func (Frame) BytesReader ¶
func (Frame) ContentLength ¶
func (Frame) ContentType ¶
func (Frame) CopyToMemory ¶
func (Frame) DebugPrint ¶
func (Frame) MarshalJSON ¶
func (Frame) ParentNodeFor ¶
type HTTPFrame ¶
type HTTPFrame struct { Frame // contains filtered or unexported fields }
func (HTTPFrame) BytesReader ¶
func (HTTPFrame) BytesValue ¶
func (HTTPFrame) ContentLength ¶
func (HTTPFrame) MarshalJSON ¶
func (HTTPFrame) ParentNodeFor ¶
type HTTPResolver ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(stateResolver StateResolver, blobResolver BlobResolver, httpResolver HTTPResolver) Resolver
func (Resolver) Resolve ¶
Given a state.Node, Resolve will recursively resolve all NelSON frames contained therein.
func (Resolver) Seek ¶
func (r Resolver) Seek(node state.Node, keypath state.Keypath) (sought state.Node, exists bool, err error)
Drills down to the provided keypath, resolving links as necessary. If the keypath resolves to a NelSON frame, the frame is returned as a nelson.Frame. Otherwise, a regular state.Node is returned.
Click to show internal directories.
Click to hide internal directories.