Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NilMetadataFieldsError = errors.New("metadata fields cannot be nil")
)
Functions ¶
func AppendGCloudTokenToOutgoingContext ¶
AppendGCloudTokenToOutgoingContext appends the GCloud token to the outgoing context
func GetCtxWithMetadata ¶
func GetCtxWithMetadata( ctxMetadata *CtxMetadata, ctx context.Context, ) context.Context
GetCtxWithMetadata gets the context with the metadata
Types ¶
type CtxMetadata ¶
type CtxMetadata struct {
MetadataFields []MetadataField
}
CtxMetadata is the metadata for the context
func NewAuthenticatedCtxMetadata ¶
func NewAuthenticatedCtxMetadata( gcloudToken string, jwtToken string, ) (*CtxMetadata, error)
NewAuthenticatedCtxMetadata creates a new authenticated CtxMetadata
func NewCtxMetadata ¶
func NewCtxMetadata(metadataFields *map[string]string) (*CtxMetadata, error)
NewCtxMetadata creates a new CtxMetadata
func NewUnauthenticatedCtxMetadata ¶
func NewUnauthenticatedCtxMetadata(gcloudToken string) (*CtxMetadata, error)
NewUnauthenticatedCtxMetadata creates a new unauthenticated CtxMetadata
type MetadataField ¶
MetadataField is a field in the metadata
Click to show internal directories.
Click to hide internal directories.