server

package
v0.0.0-...-794f3e4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientTypesMap

func ClientTypesMap(cfg *domain.Config) (map[domain.ClientType]domain.TLSConfig, error)

ClientTypesMap builds map with different client types

func NewAuthServer

func NewAuthServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.AuthZServiceServer, error)

NewAuthServer constructor.

func NewGroupsServer

func NewGroupsServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.GroupsServiceServer, error)

NewGroupsServer constructor

func NewOrganizationsServer

func NewOrganizationsServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.OrganizationsServiceServer, error)

NewOrganizationsServer constructor

func NewPermissionsServer

func NewPermissionsServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.PermissionsServiceServer, error)

NewPermissionsServer constructor

func NewPrincipalsServer

func NewPrincipalsServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.PrincipalsServiceServer, error)

NewPrincipalsServer constructor

func NewRelationshipsServer

func NewRelationshipsServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.RelationshipsServiceServer, error)

NewRelationshipsServer constructor

func NewResourcesServer

func NewResourcesServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.ResourcesServiceServer, error)

NewResourcesServer constructor

func NewRolesServer

func NewRolesServer(
	authAdminService service.AuthAdminService,
	authorizer authz.Authorizer,
) (api.RolesServiceServer, error)

NewRolesServer constructor

Types

type Clients

type Clients struct {
	AuthClient          services.AuthZServiceClient
	GroupsClient        services.GroupsServiceClient
	OrganizationsClient services.OrganizationsServiceClient
	PermissionsClient   services.PermissionsServiceClient
	PrincipalsClient    services.PrincipalsServiceClient
	RelationshipsClient services.RelationshipsServiceClient
	ResourcesClient     services.ResourcesServiceClient
	RolesClient         services.RolesServiceClient
	ClientType          domain.ClientType
}

Clients for GRPC server

func NewClients

func NewClients(caFile string, certFile string, keyFile string, addr string) (
	conn *grpc.ClientConn,
	clients Clients,
	err error)

NewClients constructor

func SetupGrpcServerForTesting

func SetupGrpcServerForTesting(
	t *testing.T,
	cfg *domain.Config,
	clientType domain.ClientType,
	fn func(config *domain.Config)) (
	clients Clients,
	teardown func())

SetupGrpcServerForTesting helper

type GrpcAdapter

type GrpcAdapter struct {
	// contains filtered or unexported fields
}

GrpcAdapter for managing gRPC server.

func StartServers

func StartServers(
	config *domain.Config,
	authService service.AuthAdminService,
	grpcOpts ...grpc.ServerOption) (adapter *GrpcAdapter, err error)

StartServers starts gRPC server.

func (*GrpcAdapter) Addr

func (a *GrpcAdapter) Addr() net.Addr

Addr for managing address of gRPC server.

func (*GrpcAdapter) Close

func (a *GrpcAdapter) Close() (err error)

Close stops server.

func (*GrpcAdapter) Serve

func (a *GrpcAdapter) Serve() (err error)

Serve starts serving requests.

Jump to

Keyboard shortcuts

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