server

package
v0.0.0-...-3bd383c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ERROR_INVALID_TOKEN = 1
	ERROR_EXPIRED_TOKEN = 2
)
View Source
const (
	USER_ACCOUNT    = 0
	SERVICE_ACCOUNT = 1
)

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func Run

func Run(ctx context.Context, network, address string) error

Run starts the example gRPC service. "network" and "address" are passed to net.Listen.

func RunInProcessGateway

func RunInProcessGateway(ctx context.Context, addr string, opts ...runtime.ServeMuxOption) error

RunInProcessGateway starts the invoke in process http gateway.

func TestTokenBuild

func TestTokenBuild()

Types

type AccountGroupUser

type AccountGroupUser struct {
	GroupId int64 `json:"ai,omitempty"`
}

type AuthTokenClaims

type AuthTokenClaims struct {
	UserID string   `json:"id"`
	Name   string   `json:"name"`
	Email  string   `json:"mail"`
	Role   []string `json:"role"`

	jwt.StandardClaims
}

type FKClaims

type FKClaims struct {
	ProjectId   int64  `json:"pi,omitempty"`
	GroupId     int64  `json:"gi,omitempty"`
	DomainId    int64  `json:"di,omitempty"`
	AccountId   int64  `json:"ai,omitempty"`
	AccountType int64  `json:"at,omitempty"`
	TokenType   string `json:"type,omitempty"`
	jwt.StandardClaims
}

type Permission

type Permission struct {
	PermissionId int64 `json:"ai,omitempty"`
}

type UserGroupUser

type UserGroupUser struct {
	UserGroupId int64 `json:"ai,omitempty"`
}

Jump to

Keyboard shortcuts

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