api

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleToProto

func BundleToProto(b *common.Bundle) (*types.Bundle, error)

func CertificatesToProto

func CertificatesToProto(rootCas []*common.Certificate) []*types.X509Certificate

func CreateStatus

func CreateStatus(code codes.Code, format string, a ...interface{}) *types.Status

CreateStatus creates a proto Status

func IDFromProto

func IDFromProto(protoID *types.SPIFFEID) (spiffeid.ID, error)

IDFromProto converts a SPIFFE ID from the given types.SPIFFEID to spiffeid.ID

func OK

func OK() *types.Status

OK creates a success proto status

func ParseJWTAuthorities

func ParseJWTAuthorities(keys []*types.JWTKey) ([]*common.PublicKey, error)

func ProtoFromID

func ProtoFromID(id spiffeid.ID) *types.SPIFFEID

ProtoFromID converts a SPIFFE ID from the given spiffeid.ID to types.SPIFFEID

func ProtoToBundle

func ProtoToBundle(b *types.Bundle) (*common.Bundle, error)

func ProtoToRegistrationEntry

func ProtoToRegistrationEntry(e *types.Entry) (*common.RegistrationEntry, error)

ProtoToRegistrationEntry converts and validate entry into common registration entry

func PublicKeysToProto

func PublicKeysToProto(keys []*common.PublicKey) []*types.JWTKey

func RegistrationEntryToProto

func RegistrationEntryToProto(e *common.RegistrationEntry) (*types.Entry, error)

RegistrationEntryToProto converts RegistrationEntry into types Entry

func StatusFromError

func StatusFromError(err error) *types.Status

StatusFromError creates a proto Status from given error

Types

type CallCounter

type CallCounter interface {
	AddLabel(name, value string)
}

type Names

type Names struct {
	// Service is the service name with the common prefix removed (e.g.,
	// svid.v1.SVID).
	Service string

	// Method is the method name (e.g. MintX509SVID)
	Method string
}

type RateLimiter

type RateLimiter interface {
	RateLimit(ctx context.Context, count int) error
}

type RateLimiterFunc

type RateLimiterFunc func(ctx context.Context, count int) error

func (RateLimiterFunc) RateLimit

func (fn RateLimiterFunc) RateLimit(ctx context.Context, count int) error

Directories

Path Synopsis
agent
v1
bundle
v1
entry
v1
svid
v1

Jump to

Keyboard shortcuts

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