v1beta1

package
v0.7.5-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapter

func NewAdapter() *adapter

Types

type GRPCServer

type GRPCServer struct {
	guardianv1beta1.UnimplementedGuardianServiceServer
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(
	resourceService resourceService,
	activityService activityService,
	providerService providerService,
	policyService policyService,
	appealService appealService,
	approvalService approvalService,
	grantService grantService,
	adapter ProtoAdapter,
	authenticatedUserContextKey interface{},
) *GRPCServer

type ProtoAdapter

type ProtoAdapter interface {
	FromProviderProto(*guardianv1beta1.Provider) (*domain.Provider, error)
	FromProviderConfigProto(*guardianv1beta1.ProviderConfig) *domain.ProviderConfig
	ToProviderProto(*domain.Provider) (*guardianv1beta1.Provider, error)
	ToProviderConfigProto(*domain.ProviderConfig) (*guardianv1beta1.ProviderConfig, error)
	ToProviderTypeProto(domain.ProviderType) *guardianv1beta1.ProviderType
	ToRole(*domain.Role) (*guardianv1beta1.Role, error)

	FromPolicyProto(*guardianv1beta1.Policy) *domain.Policy
	ToPolicyProto(*domain.Policy) (*guardianv1beta1.Policy, error)

	ToPolicyAppealConfigProto(policy *domain.Policy) *guardianv1beta1.PolicyAppealConfig

	FromResourceProto(*guardianv1beta1.Resource) *domain.Resource
	ToResourceProto(*domain.Resource) (*guardianv1beta1.Resource, error)

	ToAppealProto(*domain.Appeal) (*guardianv1beta1.Appeal, error)
	FromCreateAppealProto(*guardianv1beta1.CreateAppealRequest, string) ([]*domain.Appeal, error)
	ToApprovalProto(*domain.Approval) (*guardianv1beta1.Approval, error)

	ToGrantProto(*domain.Grant) (*guardianv1beta1.Grant, error)
	FromGrantProto(*guardianv1beta1.Grant) *domain.Grant

	ToActivityProto(*domain.Activity) (*guardianv1beta1.ProviderActivity, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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