utils

package
v0.0.0-...-72a8eb9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuthToken

func AddAuthToken(ctx context.Context, req *http.Request) error

AddAuthToken adds the auth token from the context to an outgoing IAM request

func GetAPIClient

func GetAPIClient(ctx context.Context) (*egapi.Client, error)

func GetSession

func GetSession(ctx context.Context) *kratos.Session

GetSession returns the kratos session from the context

func WithAuthToken

func WithAuthToken(ctx context.Context, token string) context.Context

WithAuthToken retuns a conext with a cookie attached

func WithSession

func WithSession(ctx context.Context, session *kratos.Session) context.Context

WithSession returns a context with a session attached

Types

This section is empty.

Jump to

Keyboard shortcuts

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