bulk

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorNotFound indicates the given resource was not found.
	ErrorNotFound = "NotFound"
	//ErrorForbidden indicates the given resource was not accessible by the user making the request.
	ErrorForbidden = "Forbidden"
	// ErrorInternalServerError indicates a server side error occured.
	ErrorInternalServerError = "InternalServerError"
)

Error categories.

Variables

This section is empty.

Functions

func ClassifyError

func ClassifyError(err error) string

ClassifyError takes an error and tries to bucket it into one of the error categories.

Types

type ReadRequest

type ReadRequest struct {
	IDs []string `json:"ids"`
}

ReadRequest is a request to read multiple IDs of a single resource type.

func (ReadRequest) OK

func (r ReadRequest) OK() error

OK validates the request.

type ResponseError

type ResponseError struct {
	Message string `json:"message"`
	Type    string `json:"type"`
}

ResponseError captures information about an error for a specific resource.

func NewResponseError

func NewResponseError(err error) *ResponseError

NewResponseError initializes a NewResponseError

Jump to

Keyboard shortcuts

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