scope

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Valid

func Valid(s AccessScope) bool

Valid : 有効なスコープ文字列かどうかを返します

Types

type AccessScope

type AccessScope string

AccessScope : クライアントのスコープ

AccessScopeに使用可能な文字のASCIIコードは次の通りです。

%x21, %x23-5B, %x5D-7E

/と"は使えません。

const (
	// OpenID : OpenID Connect用
	OpenID AccessScope = "openid"
	// Profile : OpenID Connect用
	Profile AccessScope = "profile"

	// Read : 読み込み権限
	Read AccessScope = "read"
	// PrivateRead : プライベートなチャンネルの読み込み権限
	PrivateRead AccessScope = "private_read" //TODO
	// Write : 書き込み権限
	Write AccessScope = "write"
	// PrivateWrite : プライベートなチャンネルの書き込み権限
	PrivateWrite AccessScope = "private_write" //TODO
	// Bot Botユーザー
	Bot AccessScope = "bot"
)

type AccessScopes

type AccessScopes []AccessScope

AccessScopes : AccessScopeのスライス

func (AccessScopes) Contains

func (arr AccessScopes) Contains(s AccessScope) bool

Contains : AccessScopesに指定したスコープが含まれるかどうかを返します

func (AccessScopes) GenerateRole

func (arr AccessScopes) GenerateRole() *role.CompositeRole

GenerateRole : スコープからroleを生成します

func (AccessScopes) String

func (arr AccessScopes) String() string

String : AccessScopesをスペース区切りで文字列に出力します

Jump to

Keyboard shortcuts

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