codes

package
v3.5.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 37 modules, 74 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code uint16

A Code is an unsigned 16-bit coap code as defined in the coap spec.

const (
	GET    Code = 1
	POST   Code = 2
	PUT    Code = 3
	DELETE Code = 4
)

Request Codes

const (
	Empty                   Code = 0
	Created                 Code = 65
	Deleted                 Code = 66
	Valid                   Code = 67
	Changed                 Code = 68
	Content                 Code = 69
	Continue                Code = 95
	BadRequest              Code = 128
	Unauthorized            Code = 129
	BadOption               Code = 130
	Forbidden               Code = 131
	NotFound                Code = 132
	MethodNotAllowed        Code = 133
	NotAcceptable           Code = 134
	RequestEntityIncomplete Code = 136
	PreconditionFailed      Code = 140
	RequestEntityTooLarge   Code = 141
	UnsupportedMediaType    Code = 143
	TooManyRequests         Code = 157
	InternalServerError     Code = 160
	NotImplemented          Code = 161
	BadGateway              Code = 162
	ServiceUnavailable      Code = 163
	GatewayTimeout          Code = 164
	ProxyingNotSupported    Code = 165
)

Response Codes

const (
	CSM     Code = 225
	Ping    Code = 226
	Pong    Code = 227
	Release Code = 228
	Abort   Code = 229
)

Signaling Codes for TCP

func ToCode

func ToCode(v string) (Code, error)

func (Code) String

func (c Code) String() string

func (*Code) UnmarshalJSON

func (c *Code) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals b into the Code.

Jump to

Keyboard shortcuts

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