Documentation
¶
Index ¶
- Variables
- func FindTagGetter(x any) (path string, tgType reflect.Type, found bool)
- func MustTagExpand(ctx Context, tag any) []any
- func NewErrNotComparable(x any) error
- func NewErrNotUsableAsTag(x any) error
- func TagExpand(ctx Context, tag any) ([]any, error)
- func TagString(tag any) string
- type Context
- type Tag
- type TagGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIllegalTagType errIllegalTagType
ErrIllegalTagType is returned when a UI tag type is disallowed.
View Source
var ErrNotComparable errNotComparable
ErrNotComparable is returned when a UI object or tag is not comparable.
View Source
var ErrNotUsableAsTag errNotUsableAsTag
ErrNotUsableAsTag is returned when a value cannot be used as a tag.
It is also matchable as ErrNotComparable for backwards compatibility.
View Source
var ErrTooManyTags = errTooManyTags{}
Functions ¶
func FindTagGetter ¶
FindTagGetter searches x recursively for a nested TagGetter.
func MustTagExpand ¶
func NewErrNotComparable ¶
NewErrNotComparable returns ErrNotComparable if x is not comparable.
func NewErrNotUsableAsTag ¶
NewErrNotUsableAsTag returns ErrNotUsableAsTag if x cannot be used as a tag.
Types ¶
type Context ¶
type Context interface {
// Initial returns the Request's initial HTTP request, or nil.
Initial() (r *http.Request)
// Get returns the jaws session value for the key, or nil.
Get(key string) any
// Set sets the jaws session value for the key.
Set(key string, val any)
// Context returns the Request's context.
Context() (ctx context.Context)
// Log sends an error to the Logger set in the Jaws.
// Has no effect if the err is nil or the Logger is nil.
// Returns err.
Log(err error) error
// MustLog sends an error to the Logger set in the Jaws or
// panics with the given error if no Logger is set.
// Has no effect if the err is nil.
MustLog(err error)
}
Click to show internal directories.
Click to hide internal directories.