Documentation ¶
Index ¶
- Variables
- type GrpcService
- func (s *GrpcService) AddMembership(ctx context.Context, in *iam.AddMembershipIn) (*iam.AddMembershipOut, error)
- func (s *GrpcService) Can(ctx context.Context, in *iam.CanIn) (*iam.CanOut, error)
- func (s *GrpcService) GetMembership(ctx context.Context, in *iam.GetMembershipIn) (*iam.GetMembershipOut, error)
- func (s *GrpcService) ListMembershipsForResource(ctx context.Context, in *iam.MembershipsForResourceIn) (*iam.ListMembershipsOut, error)
- func (s *GrpcService) ListMembershipsForUser(ctx context.Context, in *iam.MembershipsForUserIn) (*iam.ListMembershipsOut, error)
- func (s *GrpcService) Ping(ctx context.Context, in *iam.Message) (*iam.Message, error)
- func (s *GrpcService) RemoveMembership(ctx context.Context, in *iam.RemoveMembershipIn) (*iam.RemoveMembershipOut, error)
- func (s *GrpcService) RemoveResource(ctx context.Context, in *iam.RemoveResourceIn) (*iam.RemoveResourceOut, error)
- func (s *GrpcService) UpdateMembership(ctx context.Context, in *iam.UpdateMembershipIn) (*iam.UpdateMembershipOut, error)
- type IAMGrpcServer
- type RoleBindingMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRoleBindingNotFound error = fmt.Errorf("role binding not found")
View Source
var Module = fx.Module( "app", fx.Provide(func(ev *env.Env) (RoleBindingMap, error) { if ev.ActionRoleMapFile != "" { b, err := os.ReadFile(ev.ActionRoleMapFile) if err != nil { return nil, errors.NewE(err) } var rbm RoleBindingMap if err := json.Unmarshal(b, &rbm); err != nil { return nil, errors.NewE(err) } return rbm, nil } return roleBindings, nil }), repos.NewFxMongoRepo[*entities.RoleBinding]("role_bindings", "rb", entities.RoleBindingIndices), fx.Provide(func(logger logging.Logger, rbRepo repos.DbRepo[*entities.RoleBinding], rbm RoleBindingMap) iam.IAMServer { return newIAMGrpcService(logger, rbRepo, rbm) }), fx.Invoke( func(server IAMGrpcServer, iamService iam.IAMServer) { iam.RegisterIAMServer(server, iamService) }, ), )
Functions ¶
This section is empty.
Types ¶
type GrpcService ¶
type GrpcService struct { iam.UnimplementedIAMServer // contains filtered or unexported fields }
func (*GrpcService) AddMembership ¶
func (s *GrpcService) AddMembership(ctx context.Context, in *iam.AddMembershipIn) (*iam.AddMembershipOut, error)
func (*GrpcService) GetMembership ¶
func (s *GrpcService) GetMembership(ctx context.Context, in *iam.GetMembershipIn) (*iam.GetMembershipOut, error)
func (*GrpcService) ListMembershipsForResource ¶
func (s *GrpcService) ListMembershipsForResource(ctx context.Context, in *iam.MembershipsForResourceIn) (*iam.ListMembershipsOut, error)
func (*GrpcService) ListMembershipsForUser ¶
func (s *GrpcService) ListMembershipsForUser(ctx context.Context, in *iam.MembershipsForUserIn) (*iam.ListMembershipsOut, error)
func (*GrpcService) RemoveMembership ¶
func (s *GrpcService) RemoveMembership(ctx context.Context, in *iam.RemoveMembershipIn) (*iam.RemoveMembershipOut, error)
func (*GrpcService) RemoveResource ¶
func (s *GrpcService) RemoveResource(ctx context.Context, in *iam.RemoveResourceIn) (*iam.RemoveResourceOut, error)
func (*GrpcService) UpdateMembership ¶
func (s *GrpcService) UpdateMembership(ctx context.Context, in *iam.UpdateMembershipIn) (*iam.UpdateMembershipOut, error)
UpdateMembership updates only the role for a user on already specified resource_ref
type IAMGrpcServer ¶
Click to show internal directories.
Click to hide internal directories.