Documentation ¶
Index ¶
- func NewAdapter() *adapter
- type GRPCServer
- func (s *GRPCServer) AddApprover(ctx context.Context, req *guardianv1beta1.AddApproverRequest) (*guardianv1beta1.AddApproverResponse, error)
- func (s *GRPCServer) CancelAppeal(ctx context.Context, req *guardianv1beta1.CancelAppealRequest) (*guardianv1beta1.CancelAppealResponse, error)
- func (s *GRPCServer) CreateAppeal(ctx context.Context, req *guardianv1beta1.CreateAppealRequest) (*guardianv1beta1.CreateAppealResponse, error)
- func (s *GRPCServer) CreatePolicy(ctx context.Context, req *guardianv1beta1.CreatePolicyRequest) (*guardianv1beta1.CreatePolicyResponse, error)
- func (s *GRPCServer) CreateProvider(ctx context.Context, req *guardianv1beta1.CreateProviderRequest) (*guardianv1beta1.CreateProviderResponse, error)
- func (s *GRPCServer) DeleteApprover(ctx context.Context, req *guardianv1beta1.DeleteApproverRequest) (*guardianv1beta1.DeleteApproverResponse, error)
- func (s *GRPCServer) DeleteProvider(ctx context.Context, req *guardianv1beta1.DeleteProviderRequest) (*guardianv1beta1.DeleteProviderResponse, error)
- func (s *GRPCServer) DeleteResource(ctx context.Context, req *guardianv1beta1.DeleteResourceRequest) (*guardianv1beta1.DeleteResourceResponse, error)
- func (s *GRPCServer) GetActivity(ctx context.Context, req *guardianv1beta1.GetActivityRequest) (*guardianv1beta1.GetActivityResponse, error)
- func (s *GRPCServer) GetAppeal(ctx context.Context, req *guardianv1beta1.GetAppealRequest) (*guardianv1beta1.GetAppealResponse, error)
- func (s *GRPCServer) GetGrant(ctx context.Context, req *guardianv1beta1.GetGrantRequest) (*guardianv1beta1.GetGrantResponse, error)
- func (s *GRPCServer) GetPolicy(ctx context.Context, req *guardianv1beta1.GetPolicyRequest) (*guardianv1beta1.GetPolicyResponse, error)
- func (s *GRPCServer) GetPolicyPreferences(ctx context.Context, req *guardianv1beta1.GetPolicyPreferencesRequest) (*guardianv1beta1.GetPolicyPreferencesResponse, error)
- func (s *GRPCServer) GetProvider(ctx context.Context, req *guardianv1beta1.GetProviderRequest) (*guardianv1beta1.GetProviderResponse, error)
- func (s *GRPCServer) GetProviderTypes(ctx context.Context, req *guardianv1beta1.GetProviderTypesRequest) (*guardianv1beta1.GetProviderTypesResponse, error)
- func (s *GRPCServer) GetResource(ctx context.Context, req *guardianv1beta1.GetResourceRequest) (*guardianv1beta1.GetResourceResponse, error)
- func (s *GRPCServer) ImportActivities(ctx context.Context, req *guardianv1beta1.ImportActivitiesRequest) (*guardianv1beta1.ImportActivitiesResponse, error)
- func (s *GRPCServer) ImportGrantsFromProvider(ctx context.Context, req *guardianv1beta1.ImportGrantsFromProviderRequest) (*guardianv1beta1.ImportGrantsFromProviderResponse, error)
- func (s *GRPCServer) ListActivities(ctx context.Context, req *guardianv1beta1.ListActivitiesRequest) (*guardianv1beta1.ListActivitiesResponse, error)
- func (s *GRPCServer) ListAppeals(ctx context.Context, req *guardianv1beta1.ListAppealsRequest) (*guardianv1beta1.ListAppealsResponse, error)
- func (s *GRPCServer) ListApprovals(ctx context.Context, req *guardianv1beta1.ListApprovalsRequest) (*guardianv1beta1.ListApprovalsResponse, error)
- func (s *GRPCServer) ListGrants(ctx context.Context, req *guardianv1beta1.ListGrantsRequest) (*guardianv1beta1.ListGrantsResponse, error)
- func (s *GRPCServer) ListPolicies(ctx context.Context, req *guardianv1beta1.ListPoliciesRequest) (*guardianv1beta1.ListPoliciesResponse, error)
- func (s *GRPCServer) ListProviders(ctx context.Context, req *guardianv1beta1.ListProvidersRequest) (*guardianv1beta1.ListProvidersResponse, error)
- func (s *GRPCServer) ListResources(ctx context.Context, req *guardianv1beta1.ListResourcesRequest) (*guardianv1beta1.ListResourcesResponse, error)
- func (s *GRPCServer) ListRoles(ctx context.Context, req *guardianv1beta1.ListRolesRequest) (*guardianv1beta1.ListRolesResponse, error)
- func (s *GRPCServer) ListUserAppeals(ctx context.Context, req *guardianv1beta1.ListUserAppealsRequest) (*guardianv1beta1.ListUserAppealsResponse, error)
- func (s *GRPCServer) ListUserApprovals(ctx context.Context, req *guardianv1beta1.ListUserApprovalsRequest) (*guardianv1beta1.ListUserApprovalsResponse, error)
- func (s *GRPCServer) ListUserGrants(ctx context.Context, req *guardianv1beta1.ListUserGrantsRequest) (*guardianv1beta1.ListUserGrantsResponse, error)
- func (s *GRPCServer) RevokeGrant(ctx context.Context, req *guardianv1beta1.RevokeGrantRequest) (*guardianv1beta1.RevokeGrantResponse, error)
- func (s *GRPCServer) RevokeGrants(ctx context.Context, req *guardianv1beta1.RevokeGrantsRequest) (*guardianv1beta1.RevokeGrantsResponse, error)
- func (s *GRPCServer) UpdateApproval(ctx context.Context, req *guardianv1beta1.UpdateApprovalRequest) (*guardianv1beta1.UpdateApprovalResponse, error)
- func (s *GRPCServer) UpdateGrant(ctx context.Context, req *guardianv1beta1.UpdateGrantRequest) (*guardianv1beta1.UpdateGrantResponse, error)
- func (s *GRPCServer) UpdatePolicy(ctx context.Context, req *guardianv1beta1.UpdatePolicyRequest) (*guardianv1beta1.UpdatePolicyResponse, error)
- func (s *GRPCServer) UpdateProvider(ctx context.Context, req *guardianv1beta1.UpdateProviderRequest) (*guardianv1beta1.UpdateProviderResponse, error)
- func (s *GRPCServer) UpdateResource(ctx context.Context, req *guardianv1beta1.UpdateResourceRequest) (*guardianv1beta1.UpdateResourceResponse, error)
- type ProtoAdapter
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
func (*GRPCServer) AddApprover ¶
func (s *GRPCServer) AddApprover(ctx context.Context, req *guardianv1beta1.AddApproverRequest) (*guardianv1beta1.AddApproverResponse, error)
func (*GRPCServer) CancelAppeal ¶
func (s *GRPCServer) CancelAppeal(ctx context.Context, req *guardianv1beta1.CancelAppealRequest) (*guardianv1beta1.CancelAppealResponse, error)
func (*GRPCServer) CreateAppeal ¶
func (s *GRPCServer) CreateAppeal(ctx context.Context, req *guardianv1beta1.CreateAppealRequest) (*guardianv1beta1.CreateAppealResponse, error)
func (*GRPCServer) CreatePolicy ¶
func (s *GRPCServer) CreatePolicy(ctx context.Context, req *guardianv1beta1.CreatePolicyRequest) (*guardianv1beta1.CreatePolicyResponse, error)
func (*GRPCServer) CreateProvider ¶
func (s *GRPCServer) CreateProvider(ctx context.Context, req *guardianv1beta1.CreateProviderRequest) (*guardianv1beta1.CreateProviderResponse, error)
func (*GRPCServer) DeleteApprover ¶
func (s *GRPCServer) DeleteApprover(ctx context.Context, req *guardianv1beta1.DeleteApproverRequest) (*guardianv1beta1.DeleteApproverResponse, error)
func (*GRPCServer) DeleteProvider ¶
func (s *GRPCServer) DeleteProvider(ctx context.Context, req *guardianv1beta1.DeleteProviderRequest) (*guardianv1beta1.DeleteProviderResponse, error)
func (*GRPCServer) DeleteResource ¶
func (s *GRPCServer) DeleteResource(ctx context.Context, req *guardianv1beta1.DeleteResourceRequest) (*guardianv1beta1.DeleteResourceResponse, error)
func (*GRPCServer) GetActivity ¶
func (s *GRPCServer) GetActivity(ctx context.Context, req *guardianv1beta1.GetActivityRequest) (*guardianv1beta1.GetActivityResponse, error)
func (*GRPCServer) GetAppeal ¶
func (s *GRPCServer) GetAppeal(ctx context.Context, req *guardianv1beta1.GetAppealRequest) (*guardianv1beta1.GetAppealResponse, error)
func (*GRPCServer) GetGrant ¶
func (s *GRPCServer) GetGrant(ctx context.Context, req *guardianv1beta1.GetGrantRequest) (*guardianv1beta1.GetGrantResponse, error)
func (*GRPCServer) GetPolicy ¶
func (s *GRPCServer) GetPolicy(ctx context.Context, req *guardianv1beta1.GetPolicyRequest) (*guardianv1beta1.GetPolicyResponse, error)
func (*GRPCServer) GetPolicyPreferences ¶
func (s *GRPCServer) GetPolicyPreferences(ctx context.Context, req *guardianv1beta1.GetPolicyPreferencesRequest) (*guardianv1beta1.GetPolicyPreferencesResponse, error)
func (*GRPCServer) GetProvider ¶
func (s *GRPCServer) GetProvider(ctx context.Context, req *guardianv1beta1.GetProviderRequest) (*guardianv1beta1.GetProviderResponse, error)
func (*GRPCServer) GetProviderTypes ¶
func (s *GRPCServer) GetProviderTypes(ctx context.Context, req *guardianv1beta1.GetProviderTypesRequest) (*guardianv1beta1.GetProviderTypesResponse, error)
func (*GRPCServer) GetResource ¶
func (s *GRPCServer) GetResource(ctx context.Context, req *guardianv1beta1.GetResourceRequest) (*guardianv1beta1.GetResourceResponse, error)
func (*GRPCServer) ImportActivities ¶
func (s *GRPCServer) ImportActivities(ctx context.Context, req *guardianv1beta1.ImportActivitiesRequest) (*guardianv1beta1.ImportActivitiesResponse, error)
func (*GRPCServer) ImportGrantsFromProvider ¶
func (s *GRPCServer) ImportGrantsFromProvider(ctx context.Context, req *guardianv1beta1.ImportGrantsFromProviderRequest) (*guardianv1beta1.ImportGrantsFromProviderResponse, error)
func (*GRPCServer) ListActivities ¶
func (s *GRPCServer) ListActivities(ctx context.Context, req *guardianv1beta1.ListActivitiesRequest) (*guardianv1beta1.ListActivitiesResponse, error)
func (*GRPCServer) ListAppeals ¶
func (s *GRPCServer) ListAppeals(ctx context.Context, req *guardianv1beta1.ListAppealsRequest) (*guardianv1beta1.ListAppealsResponse, error)
func (*GRPCServer) ListApprovals ¶
func (s *GRPCServer) ListApprovals(ctx context.Context, req *guardianv1beta1.ListApprovalsRequest) (*guardianv1beta1.ListApprovalsResponse, error)
func (*GRPCServer) ListGrants ¶
func (s *GRPCServer) ListGrants(ctx context.Context, req *guardianv1beta1.ListGrantsRequest) (*guardianv1beta1.ListGrantsResponse, error)
func (*GRPCServer) ListPolicies ¶
func (s *GRPCServer) ListPolicies(ctx context.Context, req *guardianv1beta1.ListPoliciesRequest) (*guardianv1beta1.ListPoliciesResponse, error)
func (*GRPCServer) ListProviders ¶
func (s *GRPCServer) ListProviders(ctx context.Context, req *guardianv1beta1.ListProvidersRequest) (*guardianv1beta1.ListProvidersResponse, error)
func (*GRPCServer) ListResources ¶
func (s *GRPCServer) ListResources(ctx context.Context, req *guardianv1beta1.ListResourcesRequest) (*guardianv1beta1.ListResourcesResponse, error)
func (*GRPCServer) ListRoles ¶
func (s *GRPCServer) ListRoles(ctx context.Context, req *guardianv1beta1.ListRolesRequest) (*guardianv1beta1.ListRolesResponse, error)
func (*GRPCServer) ListUserAppeals ¶
func (s *GRPCServer) ListUserAppeals(ctx context.Context, req *guardianv1beta1.ListUserAppealsRequest) (*guardianv1beta1.ListUserAppealsResponse, error)
func (*GRPCServer) ListUserApprovals ¶
func (s *GRPCServer) ListUserApprovals(ctx context.Context, req *guardianv1beta1.ListUserApprovalsRequest) (*guardianv1beta1.ListUserApprovalsResponse, error)
func (*GRPCServer) ListUserGrants ¶
func (s *GRPCServer) ListUserGrants(ctx context.Context, req *guardianv1beta1.ListUserGrantsRequest) (*guardianv1beta1.ListUserGrantsResponse, error)
func (*GRPCServer) RevokeGrant ¶
func (s *GRPCServer) RevokeGrant(ctx context.Context, req *guardianv1beta1.RevokeGrantRequest) (*guardianv1beta1.RevokeGrantResponse, error)
func (*GRPCServer) RevokeGrants ¶
func (s *GRPCServer) RevokeGrants(ctx context.Context, req *guardianv1beta1.RevokeGrantsRequest) (*guardianv1beta1.RevokeGrantsResponse, error)
func (*GRPCServer) UpdateApproval ¶
func (s *GRPCServer) UpdateApproval(ctx context.Context, req *guardianv1beta1.UpdateApprovalRequest) (*guardianv1beta1.UpdateApprovalResponse, error)
func (*GRPCServer) UpdateGrant ¶
func (s *GRPCServer) UpdateGrant(ctx context.Context, req *guardianv1beta1.UpdateGrantRequest) (*guardianv1beta1.UpdateGrantResponse, error)
func (*GRPCServer) UpdatePolicy ¶
func (s *GRPCServer) UpdatePolicy(ctx context.Context, req *guardianv1beta1.UpdatePolicyRequest) (*guardianv1beta1.UpdatePolicyResponse, error)
func (*GRPCServer) UpdateProvider ¶
func (s *GRPCServer) UpdateProvider(ctx context.Context, req *guardianv1beta1.UpdateProviderRequest) (*guardianv1beta1.UpdateProviderResponse, error)
func (*GRPCServer) UpdateResource ¶
func (s *GRPCServer) UpdateResource(ctx context.Context, req *guardianv1beta1.UpdateResourceRequest) (*guardianv1beta1.UpdateResourceResponse, error)
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) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.