Documentation ¶
Index ¶
- Variables
- func Guess(path string) (tdl.MediaType, error)
- func Marshal(m proto.Message, media tdl.MediaType) ([]byte, error)
- func Match[T any](media tdl.MediaType, match Matcher[T]) (T, error)
- func Parse(value string) (tdl.MediaType, error)
- func PipeFs[I c.Pipeline[M, T], M proto.Message, T any](pipeline I, path string, zero func() M) pipe.Func[afero.Fs, T]
- func PipeInput[I c.Pipeline[M, T], M proto.Message, T any](pipeline I, zero func() M) pipe.Func[tdl.Input, T]
- func PipeRead[I c.Pipeline[M, T], M proto.Message, T any](pipeline I, media tdl.MediaType, zero func() M) pipe.Func[io.Reader, T]
- func Supported(media tdl.MediaType) bool
- func Unmarshal(data []byte, m proto.Message, media tdl.MediaType) error
- func UnsupportedErr[M string | tdl.MediaType](media M) error
- type MatchFunc
- type Matcher
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ApplicationGoogleProtobuf tdl.MediaType = "application/vnd.google.protobuf" ApplicationJson tdl.MediaType = "application/json" ApplicationProtobuf tdl.MediaType = "application/protobuf" ApplicationXProtobuf tdl.MediaType = "application/x-protobuf" ApplicationXYaml tdl.MediaType = "application/x-yaml" ApplicationYaml tdl.MediaType = "application/yaml" TextJson tdl.MediaType = "text/json" TextYaml tdl.MediaType = "text/yaml" )
View Source
var Unmatched = errors.New("no match for mediatype")
Error returned by Match when no match was found
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.