Documentation ¶
Index ¶
- func AppendGCloudTokenToOutgoingContext(ctx context.Context, gcloudToken string) context.Context
- func ExtractErrorFromStatus(flag *commonflag.ModeFlag, err error) error
- func GetCtxWithMetadata(ctxMetadata *CtxMetadata, ctx context.Context) context.Context
- func GetOutgoingCtx(ctx context.Context) (context.Context, error)
- type CtxMetadata
- type MetadataField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendGCloudTokenToOutgoingContext ¶
AppendGCloudTokenToOutgoingContext appends the GCloud token to the outgoing context
func ExtractErrorFromStatus ¶
func ExtractErrorFromStatus(flag *commonflag.ModeFlag, err error) error
ExtractErrorFromStatus extracts the error from the status
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
NewAuthenticatedCtxMetadata creates a new authenticated CtxMetadata
func NewCtxMetadata ¶
func NewCtxMetadata(metadataFields map[string]string) *CtxMetadata
NewCtxMetadata creates a new CtxMetadata
func NewUnauthenticatedCtxMetadata ¶
func NewUnauthenticatedCtxMetadata(gcloudToken string) *CtxMetadata
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.