Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetInitialGroupId() string
- func (x *CreateRequest) GetName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetClientId() string
- func (x *CreateResponse) GetClientSecret() string
- func (x *CreateResponse) GetServiceAccount() *ServiceAccount
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- type DeleteRequest
- type DeleteResponse
- type ListRequest
- type ListResponse
- type ServiceAccount
- func (*ServiceAccount) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceAccount) GetCreatedAt() *timestamppb.Timestamp
- func (x *ServiceAccount) GetCreatedBy() *model.Author
- func (x *ServiceAccount) GetGroupIds() []string
- func (x *ServiceAccount) GetManaged() bool
- func (x *ServiceAccount) GetName() string
- func (*ServiceAccount) ProtoMessage()
- func (x *ServiceAccount) ProtoReflect() protoreflect.Message
- func (x *ServiceAccount) Reset()
- func (x *ServiceAccount) String() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_service_account_service_account_proto protoreflect.FileDescriptor
var File_api_v1_service_account_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.service_account.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "List", Handler: _Service_List_Handler, }, { MethodName: "Delete", Handler: _Service_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/service_account/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 CreateRequest ¶
type CreateRequest struct { // Name of the service account to create. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // If set, the service-account will be added to this group upon creation. InitialGroupId string `protobuf:"bytes,2,opt,name=initial_group_id,json=initialGroupId,proto3" json:"initial_group_id,omitempty"` // contains filtered or unexported fields }
Request o create a service account.
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetInitialGroupId ¶
func (x *CreateRequest) GetInitialGroupId() string
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() 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 service account. ServiceAccount *ServiceAccount `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` // The client id of the service account. ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // The client secret of the service account. ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` // contains filtered or unexported fields }
Response of creating a service account.
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetClientId ¶
func (x *CreateResponse) GetClientId() string
func (*CreateResponse) GetClientSecret ¶
func (x *CreateResponse) GetClientSecret() string
func (*CreateResponse) GetServiceAccount ¶
func (x *CreateResponse) GetServiceAccount() *ServiceAccount
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 of the service account to delete. ServiceAccountId string `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` // contains filtered or unexported fields }
Request to delete a service account.
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetServiceAccountId ¶
func (x *DeleteRequest) GetServiceAccountId() 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 for deleting a service account.
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 ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
Request to list service accounts.
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
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 service accounts. ServiceAccounts []*model.ServiceAccountEntry `protobuf:"bytes,1,rep,name=service_accounts,json=serviceAccounts,proto3" json:"service_accounts,omitempty"` // contains filtered or unexported fields }
Response for listing service accounts.
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetServiceAccounts ¶
func (x *ListResponse) GetServiceAccounts() []*model.ServiceAccountEntry
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 ServiceAccount ¶
type ServiceAccount struct { // Unique name of the service account. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Creation date. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Author of the service account. CreatedBy *model.Author `protobuf:"bytes,3,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` // Whether the service account is managed by the system. Managed bool `protobuf:"varint,4,opt,name=managed,proto3" json:"managed,omitempty"` // List of group IDs the service account belongs to. GroupIds []string `protobuf:"bytes,5,rep,name=group_ids,json=groupIds,proto3" json:"group_ids,omitempty"` // contains filtered or unexported fields }
Service account model.
func (*ServiceAccount) Descriptor
deprecated
func (*ServiceAccount) Descriptor() ([]byte, []int)
Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.
func (*ServiceAccount) GetCreatedAt ¶
func (x *ServiceAccount) GetCreatedAt() *timestamppb.Timestamp
func (*ServiceAccount) GetCreatedBy ¶
func (x *ServiceAccount) GetCreatedBy() *model.Author
func (*ServiceAccount) GetGroupIds ¶
func (x *ServiceAccount) GetGroupIds() []string
func (*ServiceAccount) GetManaged ¶
func (x *ServiceAccount) GetManaged() bool
func (*ServiceAccount) GetName ¶
func (x *ServiceAccount) GetName() string
func (*ServiceAccount) ProtoMessage ¶
func (*ServiceAccount) ProtoMessage()
func (*ServiceAccount) ProtoReflect ¶
func (x *ServiceAccount) ProtoReflect() protoreflect.Message
func (*ServiceAccount) Reset ¶
func (x *ServiceAccount) Reset()
func (*ServiceAccount) String ¶
func (x *ServiceAccount) String() string
type ServiceClient ¶
type ServiceClient interface { // Create a new Service Account. The returned client_id and client_secret can // be used as login credentials. Note that the client_secret can only be read // out once, at creation. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // List all service accounts. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Delete a service account. It can take up to the TTL of access tokens for // existing sessions using this service_account, to expire. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, 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 Service Account. The returned client_id and client_secret can // be used as login credentials. Note that the client_secret can only be read // out once, at creation. Create(context.Context, *CreateRequest) (*CreateResponse, error) // List all service accounts. List(context.Context, *ListRequest) (*ListResponse, error) // Delete a service account. It can take up to the TTL of access tokens for // existing sessions using this service_account, to expire. Delete(context.Context, *DeleteRequest) (*DeleteResponse, 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) Create ¶
func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedServiceServer) Delete ¶
func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedServiceServer) List ¶
func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, 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.