iam

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_INVALID_TOKEN = 1
	ERROR_EXPIRED_TOKEN = 2
)

Variables

View Source
var Permissions = map[string]int64{}

Functions

func Auth

func Auth(accessToken string, permissions []int64) (*pb.AuthResponse, error)

func Connect

func Connect() error

func CreateToken

func CreateToken(req *pb.CreateTokenRequest) (*pb.CreateTokenResponse, error)

func GetAccountIdFromContext

func GetAccountIdFromContext(ctx context.Context) (int64, error)

func GetAccountTypeFromContext

func GetAccountTypeFromContext(ctx context.Context) (int64, error)

func GetDomainIdFromContext

func GetDomainIdFromContext(ctx context.Context) (int64, error)

func GetProjectIdFromContext

func GetProjectIdFromContext(ctx context.Context) (int64, error)

func IamServerUnaryInterceptor

func IamServerUnaryInterceptor(args map[string][]int64) grpc.UnaryServerInterceptor

func Init

func Init(cfg IamConfig)

func VerifyToken

func VerifyToken(accessToken string) (*pb.VerifyTokenResponse, error)

Types

type FKInfo

type FKInfo struct {
	DomainId       int64
	ProjectId      int64
	AccountType    int64
	AccountId      int64
	SrcServiceName string
}

type IamConfig

type IamConfig struct {
	Host string
	Port string
}

Directories

Path Synopsis
proto
iam
Package iampb is a reverse proxy.
Package iampb is a reverse proxy.

Jump to

Keyboard shortcuts

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