Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidContentType = fmt.Errorf("not a valid ContentType, try [%s]", strings.Join(_ContentTypeNames, ", "))
Functions ¶
func ContentTypeNames ¶
func ContentTypeNames() []string
ContentTypeNames returns a list of possible string values of ContentType.
Types ¶
type ContentType ¶
type ContentType string
ContentType ENUM(application/json=0)
const ( // ContentTypeApplicationJson is a ContentType of type application/json. ContentTypeApplicationJson ContentType = "application/json" )
func ParseContentType ¶
func ParseContentType(name string) (ContentType, error)
ParseContentType attempts to convert a string to a ContentType.
func (ContentType) IsValid ¶
func (x ContentType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (ContentType) MarshalText ¶
func (x ContentType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (ContentType) String ¶
func (x ContentType) String() string
String implements the Stringer interface.
func (*ContentType) UnmarshalText ¶
func (x *ContentType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
Click to show internal directories.
Click to hide internal directories.