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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserPermissionEndpoint

func AddUserPermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func AttachAccountToServiceEndpoint

func AttachAccountToServiceEndpoint(svc mgmt.Service) endpoint.Endpoint

func AttachUserToAccountEndpoint

func AttachUserToAccountEndpoint(svc mgmt.Service) endpoint.Endpoint

func BlockUserEndpoint

func BlockUserEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreateAccountEndpoint

func CreateAccountEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreateAccountWithNameEndpoint

func CreateAccountWithNameEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreatePermissionEndpoint

func CreatePermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreateServiceEndpoint

func CreateServiceEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreateUserWithLoginPasswordEndpoint

func CreateUserWithLoginPasswordEndpoint(svc mgmt.Service) endpoint.Endpoint

func CreateUserWithTelegramEndpoint

func CreateUserWithTelegramEndpoint(svc mgmt.Service) endpoint.Endpoint

func DeletePermissionEndpoint

func DeletePermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetAccountEndpoint

func GetAccountEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetAllAccountsEndpoint

func GetAllAccountsEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetAllPermissionEndpoint

func GetAllPermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetAllServicesEndpoint

func GetAllServicesEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetAllUsersEndpoint

func GetAllUsersEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetFilteredPermissionsEndpoint

func GetFilteredPermissionsEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetPermissionEndpoint

func GetPermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetServiceEndpoint

func GetServiceEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetUserEndpoint

func GetUserEndpoint(svc mgmt.Service) endpoint.Endpoint

func GetUserPermissionsEndpoint

func GetUserPermissionsEndpoint(svc mgmt.Service) endpoint.Endpoint

func RemoveAccountFromServiceEndpoint

func RemoveAccountFromServiceEndpoint(svc mgmt.Service) endpoint.Endpoint

func RemoveUserPermissionEndpoint

func RemoveUserPermissionEndpoint(svc mgmt.Service) endpoint.Endpoint

func UnblockUserEndpoint

func UnblockUserEndpoint(svc mgmt.Service) endpoint.Endpoint

func UpdateAccountEndpoint

func UpdateAccountEndpoint(svc mgmt.Service) endpoint.Endpoint

func UpdateUserEndpoint

func UpdateUserEndpoint(svc mgmt.Service) endpoint.Endpoint

Types

type AddUserPermissionRequest

type AddUserPermissionRequest struct {
	P      *types.Permission `json:"p"`
	UserId uint32            `json:"user_id"`
}

type AddUserPermissionResponse

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

type AttachAccountToServiceRequest

type AttachAccountToServiceRequest struct {
	ServiceId uint32 `json:"service_id"`
	AccountId uint32 `json:"account_id"`
}

type AttachAccountToServiceResponse

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

type AttachUserToAccountRequest

type AttachUserToAccountRequest struct {
	UserId    uint32 `json:"user_id"`
	AccountId uint32 `json:"account_id"`
}

type AttachUserToAccountResponse

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

type BlockUserRequest

type BlockUserRequest struct {
	UserId uint32 `json:"user_id"`
}

type BlockUserResponse

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

type CreateAccountRequest

type CreateAccountRequest struct{}

Formal exchange type, please do not delete.

type CreateAccountResponse

type CreateAccountResponse struct {
	A *types.Account `json:"a"`
}

type CreateAccountWithNameRequest

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

type CreateAccountWithNameResponse

type CreateAccountWithNameResponse struct {
	A *types.Account `json:"a"`
}

type CreatePermissionRequest

type CreatePermissionRequest struct {
	ServiceId uint32         `json:"service_id"`
	Name      string         `json:"name"`
	Access    *access.Access `json:"access"`
}

type CreatePermissionResponse

type CreatePermissionResponse struct {
	P *types.Permission `json:"p"`
}

type CreateServiceRequest

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

type CreateServiceResponse

type CreateServiceResponse struct {
	S *types.Service `json:"s"`
}

type CreateUserWithLoginPasswordRequest

type CreateUserWithLoginPasswordRequest struct {
	Login string `json:"login"`
	Pass  string `json:"pass"`
}

type CreateUserWithLoginPasswordResponse

type CreateUserWithLoginPasswordResponse struct {
	User *types.User `json:"user"`
}

type CreateUserWithTelegramRequest

type CreateUserWithTelegramRequest struct {
	Id    uint64 `json:"id"`
	Name  string `json:"name"`
	UserN string `json:"user_n"`
}

type CreateUserWithTelegramResponse

type CreateUserWithTelegramResponse struct {
	User *types.User `json:"user"`
}

type DeletePermissionRequest

type DeletePermissionRequest struct {
	P *types.Permission `json:"p"`
}

type DeletePermissionResponse

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

type EndpointsSet

type EndpointsSet struct {
	CreateUserWithLoginPasswordEndpoint endpoint.Endpoint
	CreateUserWithTelegramEndpoint      endpoint.Endpoint
	GetAllUsersEndpoint                 endpoint.Endpoint
	GetUserEndpoint                     endpoint.Endpoint
	UpdateUserEndpoint                  endpoint.Endpoint
	BlockUserEndpoint                   endpoint.Endpoint
	UnblockUserEndpoint                 endpoint.Endpoint
	CreateServiceEndpoint               endpoint.Endpoint
	GetAllServicesEndpoint              endpoint.Endpoint
	GetServiceEndpoint                  endpoint.Endpoint
	CreateAccountEndpoint               endpoint.Endpoint
	CreateAccountWithNameEndpoint       endpoint.Endpoint
	GetAllAccountsEndpoint              endpoint.Endpoint
	GetAccountEndpoint                  endpoint.Endpoint
	UpdateAccountEndpoint               endpoint.Endpoint
	AttachUserToAccountEndpoint         endpoint.Endpoint
	AttachAccountToServiceEndpoint      endpoint.Endpoint
	RemoveAccountFromServiceEndpoint    endpoint.Endpoint
	CreatePermissionEndpoint            endpoint.Endpoint
	GetPermissionEndpoint               endpoint.Endpoint
	GetAllPermissionEndpoint            endpoint.Endpoint
	GetFilteredPermissionsEndpoint      endpoint.Endpoint
	DeletePermissionEndpoint            endpoint.Endpoint
	GetUserPermissionsEndpoint          endpoint.Endpoint
	AddUserPermissionEndpoint           endpoint.Endpoint
	RemoveUserPermissionEndpoint        endpoint.Endpoint
}

func Endpoints

func Endpoints(svc mgmt.Service) EndpointsSet

func (EndpointsSet) AddUserPermission

func (set EndpointsSet) AddUserPermission(arg0 context.Context, arg1 *types.Permission, arg2 uint32) (res0 bool, res1 error)

func (EndpointsSet) AttachAccountToService

func (set EndpointsSet) AttachAccountToService(arg0 context.Context, arg1 uint32, arg2 uint32) (res0 bool, res1 error)

func (EndpointsSet) AttachUserToAccount

func (set EndpointsSet) AttachUserToAccount(arg0 context.Context, arg1 uint32, arg2 uint32) (res0 bool, res1 error)

func (EndpointsSet) BlockUser

func (set EndpointsSet) BlockUser(arg0 context.Context, arg1 uint32) (res0 bool, res1 error)

func (EndpointsSet) CreateAccount

func (set EndpointsSet) CreateAccount(arg0 context.Context) (res0 *types.Account, res1 error)

func (EndpointsSet) CreateAccountWithName

func (set EndpointsSet) CreateAccountWithName(arg0 context.Context, arg1 string) (res0 *types.Account, res1 error)

func (EndpointsSet) CreatePermission

func (set EndpointsSet) CreatePermission(arg0 context.Context, arg1 uint32, arg2 string, arg3 *access.Access) (res0 *types.Permission, res1 error)

func (EndpointsSet) CreateService

func (set EndpointsSet) CreateService(arg0 context.Context, arg1 string) (res0 *types.Service, res1 error)

func (EndpointsSet) CreateUserWithLoginPassword

func (set EndpointsSet) CreateUserWithLoginPassword(arg0 context.Context, arg1 string, arg2 string) (res0 *types.User, res1 error)

func (EndpointsSet) CreateUserWithTelegram

func (set EndpointsSet) CreateUserWithTelegram(arg0 context.Context, arg1 uint64, arg2 string, arg3 string) (res0 *types.User, res1 error)

func (EndpointsSet) DeletePermission

func (set EndpointsSet) DeletePermission(arg0 context.Context, arg1 *types.Permission) (res0 bool, res1 error)

func (EndpointsSet) GetAccount

func (set EndpointsSet) GetAccount(arg0 context.Context, arg1 *types.Account) (res0 *types.Account, res1 error)

func (EndpointsSet) GetAllAccounts

func (set EndpointsSet) GetAllAccounts(arg0 context.Context) (res0 []*types.Account, res1 error)

func (EndpointsSet) GetAllPermission

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

func (EndpointsSet) GetAllServices

func (set EndpointsSet) GetAllServices(arg0 context.Context) (res0 []*types.Service, res1 error)

func (EndpointsSet) GetAllUsers

func (set EndpointsSet) GetAllUsers(arg0 context.Context) (res0 []*types.User, res1 error)

func (EndpointsSet) GetFilteredPermissions

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

func (EndpointsSet) GetPermission

func (set EndpointsSet) GetPermission(arg0 context.Context, arg1 *types.Permission) (res0 *types.Permission, res1 error)

func (EndpointsSet) GetService

func (set EndpointsSet) GetService(arg0 context.Context, arg1 *types.Service) (res0 *types.Service, res1 error)

func (EndpointsSet) GetUser

func (set EndpointsSet) GetUser(arg0 context.Context, arg1 *types.User) (res0 *types.User, res1 error)

func (EndpointsSet) GetUserPermissions

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

func (EndpointsSet) RemoveAccountFromService

func (set EndpointsSet) RemoveAccountFromService(arg0 context.Context, arg1 uint32, arg2 uint32) (res0 bool, res1 error)

func (EndpointsSet) RemoveUserPermission

func (set EndpointsSet) RemoveUserPermission(arg0 context.Context, arg1 uint32, arg2 uint32) (res0 bool, res1 error)

func (EndpointsSet) UnblockUser

func (set EndpointsSet) UnblockUser(arg0 context.Context, arg1 uint32) (res0 bool, res1 error)

func (EndpointsSet) UpdateAccount

func (set EndpointsSet) UpdateAccount(arg0 context.Context, arg1 *types.Account) (res0 *types.Account, res1 error)

func (EndpointsSet) UpdateUser

func (set EndpointsSet) UpdateUser(arg0 context.Context, arg1 *types.User) (res0 *types.User, res1 error)

type GetAccountRequest

type GetAccountRequest struct {
	Acc *types.Account `json:"acc"`
}

type GetAccountResponse

type GetAccountResponse struct {
	A *types.Account `json:"a"`
}

type GetAllAccountsRequest

type GetAllAccountsRequest struct{}

Formal exchange type, please do not delete.

type GetAllAccountsResponse

type GetAllAccountsResponse struct {
	As []*types.Account `json:"as"`
}

type GetAllPermissionRequest

type GetAllPermissionRequest struct{}

Formal exchange type, please do not delete.

type GetAllPermissionResponse

type GetAllPermissionResponse struct {
	P []*types.Permission `json:"p"`
}

type GetAllServicesRequest

type GetAllServicesRequest struct{}

Formal exchange type, please do not delete.

type GetAllServicesResponse

type GetAllServicesResponse struct {
	Ss []*types.Service `json:"ss"`
}

type GetAllUsersRequest

type GetAllUsersRequest struct{}

Formal exchange type, please do not delete.

type GetAllUsersResponse

type GetAllUsersResponse struct {
	Users []*types.User `json:"users"`
}

type GetFilteredPermissionsRequest

type GetFilteredPermissionsRequest struct {
	P *types.Permission `json:"p"`
}

type GetFilteredPermissionsResponse

type GetFilteredPermissionsResponse struct {
	Perm []*types.Permission `json:"perm"`
}

type GetPermissionRequest

type GetPermissionRequest struct {
	P *types.Permission `json:"p"`
}

type GetPermissionResponse

type GetPermissionResponse struct {
	Perm *types.Permission `json:"perm"`
}

type GetServiceRequest

type GetServiceRequest struct {
	Svc *types.Service `json:"svc"`
}

type GetServiceResponse

type GetServiceResponse struct {
	S *types.Service `json:"s"`
}

type GetUserPermissionsRequest

type GetUserPermissionsRequest struct {
	UserId uint32 `json:"user_id"`
}

type GetUserPermissionsResponse

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

type GetUserRequest

type GetUserRequest struct {
	UserReq *types.User `json:"user_req"`
}

type GetUserResponse

type GetUserResponse struct {
	User *types.User `json:"user"`
}

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 RemoveAccountFromServiceRequest

type RemoveAccountFromServiceRequest struct {
	ServiceId uint32 `json:"service_id"`
	AccountId uint32 `json:"account_id"`
}

type RemoveAccountFromServiceResponse

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

type RemoveUserPermissionRequest

type RemoveUserPermissionRequest struct {
	PermId uint32 `json:"perm_id"`
	UserId uint32 `json:"user_id"`
}

type RemoveUserPermissionResponse

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

type UnblockUserRequest

type UnblockUserRequest struct {
	UserId uint32 `json:"user_id"`
}

type UnblockUserResponse

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

type UpdateAccountRequest

type UpdateAccountRequest struct {
	Acc *types.Account `json:"acc"`
}

type UpdateAccountResponse

type UpdateAccountResponse struct {
	A *types.Account `json:"a"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	UserReq *types.User `json:"user_req"`
}

type UpdateUserResponse

type UpdateUserResponse struct {
	User *types.User `json:"user"`
}

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