stdtypes

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const UnknownEnum = Enum(0)

UnknownEnum is the 0-value enum, which is present for all generated enums.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyRecord

type EmptyRecord struct{}

func (EmptyRecord) MarshalRestLi

func (e EmptyRecord) MarshalRestLi(writer restlicodec.Writer) error

func (EmptyRecord) UnmarshalRestLi

func (e EmptyRecord) UnmarshalRestLi(reader restlicodec.Reader) error

type Enum

type Enum int32

Enum is a class that all generated enums extend. It provides common logic and other utilities.

func (Enum) ComputeHash

func (e Enum) ComputeHash() fnv1a.Hash

func (Enum) Equals

func (e Enum) Equals(other Enum) bool

Equals checks the equality of the two enums. Returns false if either parameter is nil or if either enum in unknown.

func (Enum) IsUnknown

func (e Enum) IsUnknown() bool

type ErrorResponse

type ErrorResponse struct {
	// The HTTP status code.
	Status *int32
	// A human-readable explanation of the error.
	Message *string
	// The FQCN of the exception thrown by the server.
	ExceptionClass *string
	// The full stack trace of the exception thrown by the server.
	StackTrace *string
}

func UnmarshalErrorResponse

func UnmarshalErrorResponse(reader restlicodec.Reader) (e *ErrorResponse, err error)

func (*ErrorResponse) ComputeHash

func (e *ErrorResponse) ComputeHash() gofnv1a.Hash

func (*ErrorResponse) Equals

func (e *ErrorResponse) Equals(other *ErrorResponse) bool

func (*ErrorResponse) MarshalJSON

func (e *ErrorResponse) MarshalJSON() (data []byte, err error)

func (*ErrorResponse) MarshalRestLi

func (e *ErrorResponse) MarshalRestLi(writer restlicodec.Writer) (err error)

func (*ErrorResponse) UnmarshalJSON

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

func (*ErrorResponse) UnmarshalRestLi

func (e *ErrorResponse) UnmarshalRestLi(reader restlicodec.Reader) (err error)

type IllegalEnumConstant

type IllegalEnumConstant struct {
	Enum     string
	Constant int
}

func (*IllegalEnumConstant) Error

func (i *IllegalEnumConstant) Error() string

type PagingContext

type PagingContext struct {
	Start *int32

	Count *int32
}

func NewPagingContext

func NewPagingContext(start, count int32) PagingContext

func (*PagingContext) ComputeHash

func (p *PagingContext) ComputeHash() gofnv1a.Hash

func (*PagingContext) EncodeQueryParams

func (p *PagingContext) EncodeQueryParams() (rawQuery string, err error)

func (*PagingContext) Equals

func (p *PagingContext) Equals(other *PagingContext) bool

type RawRecord

type RawRecord map[string]interface{}

RawRecord is a container for arbitrary data. Because it gets parsed from raw JSON without any extra type information, it is expected that there will be unknown side effects, such as floats turning into integers or vice versa. This is designed to fill the gap for Java's DataMap-backed implementation of rest.li that supports untyped messages. To attempt deserialization into a know/real rest.li object, use the UnmarshalTo method Use at your own risk!

func (RawRecord) ComputeHash

func (r RawRecord) ComputeHash() fnv1a.Hash

ComputeHash for a RawRecord always returns the 0-hash

func (RawRecord) Equals

func (r RawRecord) Equals(other RawRecord) bool

Equals for a RawRecord always returns false, unless it is being compared with itself

func (RawRecord) MarshalRestLi

func (r RawRecord) MarshalRestLi(writer restlicodec.Writer) error

func (*RawRecord) UnmarshalRestLi

func (r *RawRecord) UnmarshalRestLi(reader restlicodec.Reader) error

func (*RawRecord) UnmarshalTo

func (r *RawRecord) UnmarshalTo(obj restlicodec.Unmarshaler) error

UnmarshalTo attempts to deserialize this RawRecord into the given object by serializing it first to JSON then calling the given object's unmarshal method

type UnknownEnumValue

type UnknownEnumValue struct {
	Enum  string
	Value string
}

func (*UnknownEnumValue) Error

func (u *UnknownEnumValue) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL