Documentation ¶
Index ¶
Constants ¶
View Source
const (
QueryParamFieldMask = "fields"
)
Variables ¶
View Source
var ( ErrFieldMaskMissing = errors.New("field mask query param is not set") ErrFieldMaskEmpty = errors.New("field mask is empty") ErrInvalidFieldMask = errors.New("field mask is invalid: ") FieldMaskRe = regexp.MustCompile(`^(\*|(\w+\.)*\*?|\w+(\.\w+)*\*?)$`) )
Functions ¶
func FieldMasksForType ¶
FieldMasksForType returns a map of JSON field names for the given struct type.
func ParseFieldMask ¶
ParseFieldMask parses and validates the field mask from the given string.
Types ¶
type InvalidFieldMaskError ¶
type InvalidFieldMaskError struct {
FieldMask []string
}
func NewInvalidFieldMaskError ¶
func NewInvalidFieldMaskError(fieldMask []string) *InvalidFieldMaskError
func (*InvalidFieldMaskError) Error ¶
func (e *InvalidFieldMaskError) Error() string
Click to show internal directories.
Click to hide internal directories.