v1beta1

package
v0.11.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 21 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{},
	logger log.Logger,
) *GRPCServer

func (*GRPCServer) CreateAppealComment added in v0.10.0

func (*GRPCServer) ListAppealActivities added in v0.11.0

func (*GRPCServer) ListAppealComments added in v0.10.0

func (*GRPCServer) ListUserRoles added in v0.7.6

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, error)

	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)

	ToCommentProto(*domain.Comment) *guardianv1beta1.AppealComment
	ToAppealActivityProto(e *domain.Event) (*guardianv1beta1.AppealActivity, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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