sin

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: MIT Imports: 4 Imported by: 1

README

sin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequest

type BadRequest struct {
	// contains filtered or unexported fields
}

BadRequest describes violations in a client request.

func NewBadRequest

func NewBadRequest(fvs ...*FieldViolation) *BadRequest

NewBadRequest returns a bad request error.

func (*BadRequest) Serialize

func (r *BadRequest) Serialize() *edpb.BadRequest

Serialize BadRequest to proto message.

func (*BadRequest) WithFieldViolations

func (r *BadRequest) WithFieldViolations(fvs ...*FieldViolation) *BadRequest

WithFieldViolations returns a new BadRequest with the provided field violations appended to the bad request.

type DebugInfo added in v0.2.0

type DebugInfo struct {
	// contains filtered or unexported fields
}

DebugInfo describes additional debugging info.

func NewDebugInfo added in v0.2.0

func NewDebugInfo(err error) *DebugInfo

NewDebugInfo returns a debug info.

func (*DebugInfo) Serialize added in v0.2.0

func (i *DebugInfo) Serialize() *edpb.DebugInfo

Serialize DebugInfo to proto message.

type FieldViolation

type FieldViolation struct {
	// contains filtered or unexported fields
}

FieldViolation describes a single bad request field.

func NewFieldViolation

func NewFieldViolation(field string, description string) *FieldViolation

NewFieldViolation returns a field violation.

func NewFieldViolationWithRule

func NewFieldViolationWithRule(field string, rule string, params ...string) *FieldViolation

NewFieldViolationWithRule returns a field violation with rule.

func (*FieldViolation) Serialize

Serialize FieldViolation to proto message.

Jump to

Keyboard shortcuts

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