Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type AssignRequest
- func (*AssignRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AssignRequest) GetEntityId() *EntityID
- func (x *AssignRequest) GetRoleId() string
- func (*AssignRequest) ProtoMessage()
- func (x *AssignRequest) ProtoReflect() protoreflect.Message
- func (x *AssignRequest) Reset()
- func (x *AssignRequest) String() string
- type AssignResponse
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetPermissions() []*Permission
- func (x *CreateRequest) GetRoleId() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type EntityID
- func (*EntityID) Descriptor() ([]byte, []int)deprecated
- func (x *EntityID) GetGroupId() string
- func (m *EntityID) GetKind() isEntityID_Kind
- func (x *EntityID) GetServiceAccountId() string
- func (x *EntityID) GetUserId() string
- func (*EntityID) ProtoMessage()
- func (x *EntityID) ProtoReflect() protoreflect.Message
- func (x *EntityID) Reset()
- func (x *EntityID) String() string
- type EntityID_GroupId
- type EntityID_ServiceAccountId
- type EntityID_UserId
- type GetRequest
- type GetResponse
- type ListAssigneesRequest
- func (*ListAssigneesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAssigneesRequest) GetPagination() *model.Pagination
- func (x *ListAssigneesRequest) GetRoleId() string
- func (*ListAssigneesRequest) ProtoMessage()
- func (x *ListAssigneesRequest) ProtoReflect() protoreflect.Message
- func (x *ListAssigneesRequest) Reset()
- func (x *ListAssigneesRequest) String() string
- type ListAssigneesResponse
- func (*ListAssigneesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAssigneesResponse) GetEntityIds() []string
- func (*ListAssigneesResponse) ProtoMessage()
- func (x *ListAssigneesResponse) ProtoReflect() protoreflect.Message
- func (x *ListAssigneesResponse) Reset()
- func (x *ListAssigneesResponse) String() string
- type ListForEntityRequest
- func (*ListForEntityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListForEntityRequest) GetEntityId() *EntityID
- func (x *ListForEntityRequest) GetPagination() *model.Pagination
- func (*ListForEntityRequest) ProtoMessage()
- func (x *ListForEntityRequest) ProtoReflect() protoreflect.Message
- func (x *ListForEntityRequest) Reset()
- func (x *ListForEntityRequest) String() string
- type ListForEntityResponse
- func (*ListForEntityResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListForEntityResponse) GetRoleIds() []string
- func (*ListForEntityResponse) ProtoMessage()
- func (x *ListForEntityResponse) ProtoReflect() protoreflect.Message
- func (x *ListForEntityResponse) Reset()
- func (x *ListForEntityResponse) String() string
- type ListRequest
- type ListResponse
- type Permission
- type RevokeRequest
- func (*RevokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RevokeRequest) GetEntityId() *EntityID
- func (x *RevokeRequest) GetRoleId() string
- func (*RevokeRequest) ProtoMessage()
- func (x *RevokeRequest) ProtoReflect() protoreflect.Message
- func (x *RevokeRequest) Reset()
- func (x *RevokeRequest) String() string
- type RevokeResponse
- type Role
- func (*Role) Descriptor() ([]byte, []int)deprecated
- func (x *Role) GetCreatedAt() *timestamppb.Timestamp
- func (x *Role) GetMetadata() map[string][]byte
- func (x *Role) GetPermissions() []*Permission
- func (x *Role) GetRoleId() string
- func (x *Role) GetUpdatedAt() *timestamppb.Timestamp
- func (*Role) ProtoMessage()
- func (x *Role) ProtoReflect() protoreflect.Message
- func (x *Role) Reset()
- func (x *Role) String() string
- type Scope
- func (*Scope) Descriptor() ([]byte, []int)deprecated
- func (x *Scope) GetEnvironment() string
- func (x *Scope) GetProject() string
- func (x *Scope) GetResource() string
- func (*Scope) ProtoMessage()
- func (x *Scope) ProtoReflect() protoreflect.Message
- func (x *Scope) Reset()
- func (x *Scope) String() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Assign(context.Context, *AssignRequest) (*AssignResponse, error)
- func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedServiceServer) ListAssignees(context.Context, *ListAssigneesRequest) (*ListAssigneesResponse, error)
- func (UnimplementedServiceServer) ListForEntity(context.Context, *ListForEntityRequest) (*ListForEntityResponse, error)
- func (UnimplementedServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error)
- func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeServiceServer
- type Update
- func (*Update) Descriptor() ([]byte, []int)deprecated
- func (x *Update) GetAddPermission() *Permission
- func (x *Update) GetDeleteMetadataKey() string
- func (x *Update) GetRemovePermission() *Permission
- func (x *Update) GetSetMetadata() *model.Metadata
- func (m *Update) GetUpdate() isUpdate_Update
- func (*Update) ProtoMessage()
- func (x *Update) ProtoReflect() protoreflect.Message
- func (x *Update) Reset()
- func (x *Update) String() string
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetRoleId() string
- func (x *UpdateRequest) GetUpdates() []*Update
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
- type Update_AddPermission
- type Update_DeleteMetadataKey
- type Update_RemovePermission
- type Update_SetMetadata
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_role_role_proto protoreflect.FileDescriptor
var File_api_v1_role_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.role.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Delete", Handler: _Service_Delete_Handler, }, { MethodName: "List", Handler: _Service_List_Handler, }, { MethodName: "Update", Handler: _Service_Update_Handler, }, { MethodName: "Get", Handler: _Service_Get_Handler, }, { MethodName: "Assign", Handler: _Service_Assign_Handler, }, { MethodName: "Revoke", Handler: _Service_Revoke_Handler, }, { MethodName: "ListForEntity", Handler: _Service_ListForEntity_Handler, }, { MethodName: "ListAssignees", Handler: _Service_ListAssignees_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/role/service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type AssignRequest ¶
type AssignRequest struct { // The role to assign. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The entity to assign the role to. EntityId *EntityID `protobuf:"bytes,2,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` // contains filtered or unexported fields }
Assign a role to an entity.
func (*AssignRequest) Descriptor
deprecated
func (*AssignRequest) Descriptor() ([]byte, []int)
Deprecated: Use AssignRequest.ProtoReflect.Descriptor instead.
func (*AssignRequest) GetEntityId ¶
func (x *AssignRequest) GetEntityId() *EntityID
func (*AssignRequest) GetRoleId ¶
func (x *AssignRequest) GetRoleId() string
func (*AssignRequest) ProtoMessage ¶
func (*AssignRequest) ProtoMessage()
func (*AssignRequest) ProtoReflect ¶
func (x *AssignRequest) ProtoReflect() protoreflect.Message
func (*AssignRequest) Reset ¶
func (x *AssignRequest) Reset()
func (*AssignRequest) String ¶
func (x *AssignRequest) String() string
type AssignResponse ¶
type AssignResponse struct {
// contains filtered or unexported fields
}
Empty response of assigning a role to an entity.
func (*AssignResponse) Descriptor
deprecated
func (*AssignResponse) Descriptor() ([]byte, []int)
Deprecated: Use AssignResponse.ProtoReflect.Descriptor instead.
func (*AssignResponse) ProtoMessage ¶
func (*AssignResponse) ProtoMessage()
func (*AssignResponse) ProtoReflect ¶
func (x *AssignResponse) ProtoReflect() protoreflect.Message
func (*AssignResponse) Reset ¶
func (x *AssignResponse) Reset()
func (*AssignResponse) String ¶
func (x *AssignResponse) String() string
type CreateRequest ¶
type CreateRequest struct { // The id / name of the role to create. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The permissions to assign to the role. Permissions []*Permission `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` // contains filtered or unexported fields }
Request to create a role.
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetPermissions ¶
func (x *CreateRequest) GetPermissions() []*Permission
func (*CreateRequest) GetRoleId ¶
func (x *CreateRequest) GetRoleId() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { // The created role. Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
Response to create a role.
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetRole ¶
func (x *CreateResponse) GetRole() *Role
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { // The id / name of the role to delete. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // contains filtered or unexported fields }
Request to delete a role.
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetRoleId ¶
func (x *DeleteRequest) GetRoleId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
Empty Response to delete a role.
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type EntityID ¶
type EntityID struct { // The type of entity that has a role. // // Types that are assignable to Kind: // // *EntityID_UserId // *EntityID_ServiceAccountId // *EntityID_GroupId Kind isEntityID_Kind `protobuf_oneof:"kind"` // contains filtered or unexported fields }
EntityID is a oneof type that can be used to represent a user, service account or group.
func (*EntityID) Descriptor
deprecated
func (*EntityID) GetGroupId ¶
func (*EntityID) GetServiceAccountId ¶
func (*EntityID) ProtoMessage ¶
func (*EntityID) ProtoMessage()
func (*EntityID) ProtoReflect ¶
func (x *EntityID) ProtoReflect() protoreflect.Message
type EntityID_GroupId ¶
type EntityID_GroupId struct { // Group entity. GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3,oneof"` }
type EntityID_ServiceAccountId ¶
type EntityID_ServiceAccountId struct { // Service account entity. ServiceAccountId string `protobuf:"bytes,2,opt,name=service_account_id,json=serviceAccountId,proto3,oneof"` }
type EntityID_UserId ¶
type EntityID_UserId struct { // User entity. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3,oneof"` }
type GetRequest ¶
type GetRequest struct { // The role to retrieve. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // contains filtered or unexported fields }
Request to retrieve a role.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetRoleId ¶
func (x *GetRequest) GetRoleId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { // The retrieved role. Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
Response to getting a role.
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetRole ¶
func (x *GetResponse) GetRole() *Role
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type ListAssigneesRequest ¶
type ListAssigneesRequest struct { // The role to list assignees for. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // Pagination options. Pagination *model.Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // contains filtered or unexported fields }
func (*ListAssigneesRequest) Descriptor
deprecated
func (*ListAssigneesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAssigneesRequest.ProtoReflect.Descriptor instead.
func (*ListAssigneesRequest) GetPagination ¶
func (x *ListAssigneesRequest) GetPagination() *model.Pagination
func (*ListAssigneesRequest) GetRoleId ¶
func (x *ListAssigneesRequest) GetRoleId() string
func (*ListAssigneesRequest) ProtoMessage ¶
func (*ListAssigneesRequest) ProtoMessage()
func (*ListAssigneesRequest) ProtoReflect ¶
func (x *ListAssigneesRequest) ProtoReflect() protoreflect.Message
func (*ListAssigneesRequest) Reset ¶
func (x *ListAssigneesRequest) Reset()
func (*ListAssigneesRequest) String ¶
func (x *ListAssigneesRequest) String() string
type ListAssigneesResponse ¶
type ListAssigneesResponse struct { // The assignees of the role. EntityIds []string `protobuf:"bytes,1,rep,name=entity_ids,json=entityIds,proto3" json:"entity_ids,omitempty"` // contains filtered or unexported fields }
func (*ListAssigneesResponse) Descriptor
deprecated
func (*ListAssigneesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAssigneesResponse.ProtoReflect.Descriptor instead.
func (*ListAssigneesResponse) GetEntityIds ¶
func (x *ListAssigneesResponse) GetEntityIds() []string
func (*ListAssigneesResponse) ProtoMessage ¶
func (*ListAssigneesResponse) ProtoMessage()
func (*ListAssigneesResponse) ProtoReflect ¶
func (x *ListAssigneesResponse) ProtoReflect() protoreflect.Message
func (*ListAssigneesResponse) Reset ¶
func (x *ListAssigneesResponse) Reset()
func (*ListAssigneesResponse) String ¶
func (x *ListAssigneesResponse) String() string
type ListForEntityRequest ¶
type ListForEntityRequest struct { // The entity to list roles for. EntityId *EntityID `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` // Pagination options. Pagination *model.Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // contains filtered or unexported fields }
func (*ListForEntityRequest) Descriptor
deprecated
func (*ListForEntityRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListForEntityRequest.ProtoReflect.Descriptor instead.
func (*ListForEntityRequest) GetEntityId ¶
func (x *ListForEntityRequest) GetEntityId() *EntityID
func (*ListForEntityRequest) GetPagination ¶
func (x *ListForEntityRequest) GetPagination() *model.Pagination
func (*ListForEntityRequest) ProtoMessage ¶
func (*ListForEntityRequest) ProtoMessage()
func (*ListForEntityRequest) ProtoReflect ¶
func (x *ListForEntityRequest) ProtoReflect() protoreflect.Message
func (*ListForEntityRequest) Reset ¶
func (x *ListForEntityRequest) Reset()
func (*ListForEntityRequest) String ¶
func (x *ListForEntityRequest) String() string
type ListForEntityResponse ¶
type ListForEntityResponse struct { // The roles assigned to the entity. RoleIds []string `protobuf:"bytes,1,rep,name=role_ids,json=roleIds,proto3" json:"role_ids,omitempty"` // contains filtered or unexported fields }
func (*ListForEntityResponse) Descriptor
deprecated
func (*ListForEntityResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListForEntityResponse.ProtoReflect.Descriptor instead.
func (*ListForEntityResponse) GetRoleIds ¶
func (x *ListForEntityResponse) GetRoleIds() []string
func (*ListForEntityResponse) ProtoMessage ¶
func (*ListForEntityResponse) ProtoMessage()
func (*ListForEntityResponse) ProtoReflect ¶
func (x *ListForEntityResponse) ProtoReflect() protoreflect.Message
func (*ListForEntityResponse) Reset ¶
func (x *ListForEntityResponse) Reset()
func (*ListForEntityResponse) String ¶
func (x *ListForEntityResponse) String() string
type ListRequest ¶
type ListRequest struct { // Pagination options. Pagination *model.Pagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` // contains filtered or unexported fields }
Request to list roles.
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPagination ¶
func (x *ListRequest) GetPagination() *model.Pagination
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { // The retrieved roles. Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
Response to list roles.
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetRoles ¶
func (x *ListResponse) GetRoles() []*Role
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type Permission ¶
type Permission struct { // The action that is action permission to perform. Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` // The scope in which the action can be performed. Scope *Scope `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` // contains filtered or unexported fields }
A permission that is granted to a role.
func (*Permission) Descriptor
deprecated
func (*Permission) Descriptor() ([]byte, []int)
Deprecated: Use Permission.ProtoReflect.Descriptor instead.
func (*Permission) GetAction ¶
func (x *Permission) GetAction() string
func (*Permission) GetScope ¶
func (x *Permission) GetScope() *Scope
func (*Permission) ProtoMessage ¶
func (*Permission) ProtoMessage()
func (*Permission) ProtoReflect ¶
func (x *Permission) ProtoReflect() protoreflect.Message
func (*Permission) Reset ¶
func (x *Permission) Reset()
func (*Permission) String ¶
func (x *Permission) String() string
type RevokeRequest ¶
type RevokeRequest struct { // The role to revoke. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The entity to revoke the role from. EntityId *EntityID `protobuf:"bytes,2,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` // contains filtered or unexported fields }
Revoke a role from an entity.
func (*RevokeRequest) Descriptor
deprecated
func (*RevokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RevokeRequest.ProtoReflect.Descriptor instead.
func (*RevokeRequest) GetEntityId ¶
func (x *RevokeRequest) GetEntityId() *EntityID
func (*RevokeRequest) GetRoleId ¶
func (x *RevokeRequest) GetRoleId() string
func (*RevokeRequest) ProtoMessage ¶
func (*RevokeRequest) ProtoMessage()
func (*RevokeRequest) ProtoReflect ¶
func (x *RevokeRequest) ProtoReflect() protoreflect.Message
func (*RevokeRequest) Reset ¶
func (x *RevokeRequest) Reset()
func (*RevokeRequest) String ¶
func (x *RevokeRequest) String() string
type RevokeResponse ¶
type RevokeResponse struct {
// contains filtered or unexported fields
}
Empty response for revoking a role.
func (*RevokeResponse) Descriptor
deprecated
func (*RevokeResponse) Descriptor() ([]byte, []int)
Deprecated: Use RevokeResponse.ProtoReflect.Descriptor instead.
func (*RevokeResponse) ProtoMessage ¶
func (*RevokeResponse) ProtoMessage()
func (*RevokeResponse) ProtoReflect ¶
func (x *RevokeResponse) ProtoReflect() protoreflect.Message
func (*RevokeResponse) Reset ¶
func (x *RevokeResponse) Reset()
func (*RevokeResponse) String ¶
func (x *RevokeResponse) String() string
type Role ¶
type Role struct { // Unique ID of the role. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The permissions granted to the role. Permissions []*Permission `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` // Metadata associated with the role. Metadata map[string][]byte `` /* 157-byte string literal not displayed */ // Timestamp when the role was created. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp when the role was last updated. UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
Role model for Role based access control.
func (*Role) Descriptor
deprecated
func (*Role) GetCreatedAt ¶
func (x *Role) GetCreatedAt() *timestamppb.Timestamp
func (*Role) GetMetadata ¶
func (*Role) GetPermissions ¶
func (x *Role) GetPermissions() []*Permission
func (*Role) GetUpdatedAt ¶
func (x *Role) GetUpdatedAt() *timestamppb.Timestamp
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
type Scope ¶
type Scope struct { // The resource on which the action can be performed. This consists of a type, // and an optional ID. fx. "user/*", "group/admin" Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // The environment in which the action can be performed. This can be a // wildcard. Environment string `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` // The project in which the action can be performed. This can be a wildcard. Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` // contains filtered or unexported fields }
Scope for permissions.
func (*Scope) Descriptor
deprecated
func (*Scope) GetEnvironment ¶
func (*Scope) GetProject ¶
func (*Scope) GetResource ¶
func (*Scope) ProtoMessage ¶
func (*Scope) ProtoMessage()
func (*Scope) ProtoReflect ¶
func (x *Scope) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { // Create a new role. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Delete role. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) // List roles. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Update role Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // Get role. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // Assign a role. Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error) // Revoke a role. Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) // List roles for an entity. ListForEntity(ctx context.Context, in *ListForEntityRequest, opts ...grpc.CallOption) (*ListForEntityResponse, error) // List Assignees. ListAssignees(ctx context.Context, in *ListAssigneesRequest, opts ...grpc.CallOption) (*ListAssigneesResponse, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // Create a new role. Create(context.Context, *CreateRequest) (*CreateResponse, error) // Delete role. Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) // List roles. List(context.Context, *ListRequest) (*ListResponse, error) // Update role Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // Get role. Get(context.Context, *GetRequest) (*GetResponse, error) // Assign a role. Assign(context.Context, *AssignRequest) (*AssignResponse, error) // Revoke a role. Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) // List roles for an entity. ListForEntity(context.Context, *ListForEntityRequest) (*ListForEntityResponse, error) // List Assignees. ListAssignees(context.Context, *ListAssigneesRequest) (*ListAssigneesResponse, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Assign ¶
func (UnimplementedServiceServer) Assign(context.Context, *AssignRequest) (*AssignResponse, error)
func (UnimplementedServiceServer) Create ¶
func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedServiceServer) Delete ¶
func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedServiceServer) Get ¶
func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedServiceServer) List ¶
func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedServiceServer) ListAssignees ¶
func (UnimplementedServiceServer) ListAssignees(context.Context, *ListAssigneesRequest) (*ListAssigneesResponse, error)
func (UnimplementedServiceServer) ListForEntity ¶
func (UnimplementedServiceServer) ListForEntity(context.Context, *ListForEntityRequest) (*ListForEntityResponse, error)
func (UnimplementedServiceServer) Revoke ¶
func (UnimplementedServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error)
func (UnimplementedServiceServer) Update ¶
func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.
type Update ¶
type Update struct { // Types that are assignable to Update: // // *Update_AddPermission // *Update_RemovePermission // *Update_SetMetadata // *Update_DeleteMetadataKey Update isUpdate_Update `protobuf_oneof:"update"` // contains filtered or unexported fields }
Update message to update a field of a role.
func (*Update) Descriptor
deprecated
func (*Update) GetAddPermission ¶
func (x *Update) GetAddPermission() *Permission
func (*Update) GetDeleteMetadataKey ¶
func (*Update) GetRemovePermission ¶
func (x *Update) GetRemovePermission() *Permission
func (*Update) GetSetMetadata ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶
func (x *Update) ProtoReflect() protoreflect.Message
type UpdateRequest ¶
type UpdateRequest struct { // the role to update. RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // The updates to apply to the role. Updates []*Update `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates,omitempty"` // contains filtered or unexported fields }
Request to update a role.
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetRoleId ¶
func (x *UpdateRequest) GetRoleId() string
func (*UpdateRequest) GetUpdates ¶
func (x *UpdateRequest) GetUpdates() []*Update
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct {
// contains filtered or unexported fields
}
Empty update response.
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
type Update_AddPermission ¶
type Update_AddPermission struct { // Adding a permission to the role. AddPermission *Permission `protobuf:"bytes,1,opt,name=add_permission,json=addPermission,proto3,oneof"` }
type Update_DeleteMetadataKey ¶
type Update_DeleteMetadataKey struct { // Delete a metadata field on the role. DeleteMetadataKey string `protobuf:"bytes,4,opt,name=delete_metadata_key,json=deleteMetadataKey,proto3,oneof"` }
type Update_RemovePermission ¶
type Update_RemovePermission struct { // Removing a permission from the role. RemovePermission *Permission `protobuf:"bytes,2,opt,name=remove_permission,json=removePermission,proto3,oneof"` }