common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceMetadataSignature = 0x54424252 // "RBBT"
	NamespaceMetadataRevision  = 1
)

Variables

View Source
var (
	ErrNamespaceMetadata = NewNamespaceMetadataError(nil)
)

Functions

func EncodeNamespaceMetadata

func EncodeNamespaceMetadata(pid uuid.UUID, index uint16, count uint16) ([]byte, error)

func EncodeResponse

func EncodeResponse(s interface{}, err error, w http.ResponseWriter)

EncodeResponse -

func Params

func Params(r *http.Request) map[string]string

Params -

func UnmarshalRequest

func UnmarshalRequest(r *http.Request, model interface{}) error

UnmarshalRequest -

Types

type NamespaceMetadata

type NamespaceMetadata struct {
	Signature uint32
	Revision  uint16
	Rsvd      uint16
	Index     uint16
	Count     uint16
	Id        uuid.UUID
}

func DecodeNamespaceMetadata

func DecodeNamespaceMetadata(buf []byte) (*NamespaceMetadata, error)

type NamespaceMetadataError

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

func NewNamespaceMetadataError

func NewNamespaceMetadataError(data *NamespaceMetadata) *NamespaceMetadataError

func (*NamespaceMetadataError) Error

func (e *NamespaceMetadataError) Error() string

func (*NamespaceMetadataError) Is

func (e *NamespaceMetadataError) Is(err error) bool

Jump to

Keyboard shortcuts

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