context

package
v0.0.0-...-18b278e Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Background

func Background() context.Context

func GetClientID

func GetClientID(ctx context.Context) string

func GetUser

func GetUser(ctx context.Context) *model.User

func GetUserID

func GetUserID(ctx context.Context) string

func IsInternalCall

func IsInternalCall(ctx context.Context) bool

func IsVerifiedCall

func IsVerifiedCall(ctx context.Context) bool

func NewRequestCtx

func NewRequestCtx(ctx context.Context, clientID string) context.Context

func WithCancel

func WithCancel(ctx context.Context) (context.Context, func())

func WithInternalCall

func WithInternalCall(ctx context.Context, b bool) context.Context

func WithTimeout

func WithTimeout(ctx context.Context, t time.Duration) (context.Context, func())

func WithUser

func WithUser(ctx context.Context, sessionID string, user *model.User) context.Context

Types

type Context

type Context interface {
	Deadline() (time.Time, bool)
	Done() <-chan struct{}
	Err() error
	Value(interface{}) interface{}
}

Jump to

Keyboard shortcuts

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