service

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCreatorIDFromContext

func GetCreatorIDFromContext(ctx context.Context) (string, bool)

GetCreatorIDFromContext はContextからセッション作成者のIDを取得します。

func GetTokenFromContext

func GetTokenFromContext(ctx context.Context) (*oauth2.Token, bool)

GetTokenFromContext はContextからトークンを取得します。

func GetUserIDFromContext

func GetUserIDFromContext(ctx context.Context) (string, bool)

GetUserIDFromContext はContextからユーザIDを取得します。

func SetCreatorIDToContext

func SetCreatorIDToContext(ctx context.Context, userID string) context.Context

SetCreatorIDToContext はセッション作成者のIDをContextにセットします。

func SetTokenToContext

func SetTokenToContext(ctx context.Context, token *oauth2.Token) context.Context

SetTokenToContext はトークンをContextにセットします。

func SetUserIDToContext

func SetUserIDToContext(ctx context.Context, userID string) context.Context

SetUserIDToContext はユーザIDをContextにセットします。

Types

type ContextKey

type ContextKey string

ContextKey はContextに情報を保存するときのキーです。

Jump to

Keyboard shortcuts

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