bid

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BidPrefix            = "bid"
	ResourceBidPrefix    = "r"
	EntitlementBidPrefix = "e"
	GrantBidPrefix       = "g"
)

Variables

This section is empty.

Functions

func MakeBid

func MakeBid(b BID) (string, error)

func MustMakeBid

func MustMakeBid(b BID) string

func ParseEntitlementBid

func ParseEntitlementBid(bidStr string) (*v2.Entitlement, error)

func ParseGrantBid

func ParseGrantBid(bidStr string) (*v2.Grant, error)

func ParseResourceBid

func ParseResourceBid(bidStr string) (*v2.Resource, error)

Types

type BID

type BID interface {
	proto.Message
	// TODO: be smarter about this interface.
	GetAnnotations() []*anypb.Any
}

func Parse

func Parse(bidStr string) (BID, error)

type BIDError

type BIDError interface {
	error
}

type BIDParseError

type BIDParseError struct {
	BIDError
	Msg string
	// contains filtered or unexported fields
}

func NewBidParseError

func NewBidParseError(bs *bidScanner, msg string, a ...any) *BIDParseError

func (*BIDParseError) Error

func (e *BIDParseError) Error() string

type BIDStringError

type BIDStringError struct {
	BIDError
	Msg string
	// contains filtered or unexported fields
}

func NewBidStringError

func NewBidStringError(resource BID, msg string, a ...any) *BIDStringError

func (*BIDStringError) Error

func (e *BIDStringError) Error() string

Jump to

Keyboard shortcuts

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