v1beta1

package
v0.12.7-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 22 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

func (*GRPCServer) PatchAppeal added in v0.11.0

func (*GRPCServer) RestoreGrant added in v0.11.0

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)
	FromPatchAppealProto(*guardianv1beta1.PatchAppealRequest, string) (*domain.Appeal, error)
	ToApprovalProto(*domain.Approval) (*guardianv1beta1.Approval, error)

	ToGrantProto(*domain.Grant) (*guardianv1beta1.Grant, error)
	FromGrantProto(*guardianv1beta1.Grant) *domain.Grant
	FromUpdateGrantRequestProto(*guardianv1beta1.UpdateGrantRequest) *domain.GrantUpdate

	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