transport

package
v0.0.0-...-53ff5f4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPermissionsForServiceEndpoint

func GetPermissionsForServiceEndpoint(svc auth.Service) endpoint.Endpoint

func LoginEndpoint

func LoginEndpoint(svc auth.Service) endpoint.Endpoint

func PublicKeyEndpoint

func PublicKeyEndpoint(svc auth.Service) endpoint.Endpoint

func RegisterEndpoint

func RegisterEndpoint(svc auth.Service) endpoint.Endpoint

Types

type EndpointsSet

type EndpointsSet struct {
	RegisterEndpoint                 endpoint.Endpoint
	LoginEndpoint                    endpoint.Endpoint
	PublicKeyEndpoint                endpoint.Endpoint
	GetPermissionsForServiceEndpoint endpoint.Endpoint
}

func Endpoints

func Endpoints(svc auth.Service) EndpointsSet

func (EndpointsSet) GetPermissionsForService

func (set EndpointsSet) GetPermissionsForService(arg0 context.Context, arg1 string) (res0 []*types.Permission, res1 error)

func (EndpointsSet) Login

func (set EndpointsSet) Login(arg0 context.Context, arg1 string, arg2 string, arg3 string) (res0 *types.AccessToken, res1 error)

func (EndpointsSet) PublicKey

func (set EndpointsSet) PublicKey(arg0 context.Context) (res0 []byte, res1 error)

func (EndpointsSet) Register

func (set EndpointsSet) Register(arg0 context.Context, arg1 string, arg2 string, arg3 string, arg4 uint32) (res0 bool, res1 error)

type GetPermissionsForServiceRequest

type GetPermissionsForServiceRequest struct {
	Name string `json:"name"`
}

type GetPermissionsForServiceResponse

type GetPermissionsForServiceResponse struct {
	Permissions []*types.Permission `json:"permissions"`
}

type LoginRequest

type LoginRequest struct {
	Login    string `json:"login"`
	Password string `json:"password"`
	Service  string `json:"service"`
}

type LoginResponse

type LoginResponse struct {
	Token *types.AccessToken `json:"token"`
}

type ManyToManyStreamEndpoint

type ManyToManyStreamEndpoint func(stream interface{}) error

type ManyToOneStreamEndpoint

type ManyToOneStreamEndpoint func(stream interface{}) error

type OneToManyStreamEndpoint

type OneToManyStreamEndpoint func(req interface{}, stream interface{}) error

EndpointsSet implements Service API and used for transport purposes.

type PublicKeyRequest

type PublicKeyRequest struct{}

Formal exchange type, please do not delete.

type PublicKeyResponse

type PublicKeyResponse struct {
	Pub []byte `json:"pub"`
}

type RegisterRequest

type RegisterRequest struct {
	Login     string `json:"login"`
	Password  string `json:"password"`
	Service   string `json:"service"`
	AccountId uint32 `json:"account_id"`
}

type RegisterResponse

type RegisterResponse struct {
	Ok bool `json:"ok"`
}

Directories

Path Synopsis
Please, do not change functions names!
Please, do not change functions names!
Please, do not change functions names!
Please, do not change functions names!

Jump to

Keyboard shortcuts

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