Documentation ¶ Index ¶ func GetClientIP(ctx context.Context) net.IP func SetClientIP(ctx context.Context, ip net.IP) context.Context func SetUser(ctx context.Context, user *User) context.Context type ClientIPKey type User func GetUser(ctx context.Context) *User type UserCtxKey Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetClientIP ¶ func GetClientIP(ctx context.Context) net.IP func SetClientIP ¶ func SetClientIP(ctx context.Context, ip net.IP) context.Context func SetUser ¶ func SetUser(ctx context.Context, user *User) context.Context Types ¶ type ClientIPKey ¶ type ClientIPKey struct{} type User ¶ type User struct { Username string } func GetUser ¶ func GetUser(ctx context.Context) *User type UserCtxKey ¶ type UserCtxKey struct{} Source Files ¶ View all Source files auth.go context.go Click to show internal directories. Click to hide internal directories.