Documentation ¶
Overview ¶
Package projects is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterProjectsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProjectsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectsClient) error
- func RegisterProjectsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProjectsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProjectsServer) error
- func RegisterProjectsServer(s grpc.ServiceRegistrar, srv ProjectsServer)
- type CreateRequest
- type CreateResponse
- type GetRequest
- type GetResponse
- type InviteRequest
- func (*InviteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InviteRequest) GetEmail() string
- func (x *InviteRequest) GetProjectId() string
- func (*InviteRequest) ProtoMessage()
- func (x *InviteRequest) ProtoReflect() protoreflect.Message
- func (x *InviteRequest) Reset()
- func (x *InviteRequest) String() string
- type InviteResponse
- type ListRequest
- type ListResponse
- type Project
- func (*Project) Descriptor() ([]byte, []int)deprecated
- func (x *Project) GetAccounts() []*ProjectAccount
- func (x *Project) GetCreatedAt() *timestamp.Timestamp
- func (x *Project) GetId() string
- func (x *Project) GetInvites() []*ProjectInvite
- func (x *Project) GetName() string
- func (x *Project) GetUpdatedAt() *timestamp.Timestamp
- func (*Project) ProtoMessage()
- func (x *Project) ProtoReflect() protoreflect.Message
- func (x *Project) Reset()
- func (x *Project) String() string
- type ProjectAccount
- func (*ProjectAccount) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectAccount) GetAccountId() string
- func (x *ProjectAccount) GetCreatedAt() *timestamp.Timestamp
- func (x *ProjectAccount) GetRelation() ProjectAccountRelation
- func (x *ProjectAccount) GetUpdatedAt() *timestamp.Timestamp
- func (*ProjectAccount) ProtoMessage()
- func (x *ProjectAccount) ProtoReflect() protoreflect.Message
- func (x *ProjectAccount) Reset()
- func (x *ProjectAccount) String() string
- type ProjectAccountRelation
- func (ProjectAccountRelation) Descriptor() protoreflect.EnumDescriptor
- func (x ProjectAccountRelation) Enum() *ProjectAccountRelation
- func (ProjectAccountRelation) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProjectAccountRelation) Number() protoreflect.EnumNumber
- func (x ProjectAccountRelation) String() string
- func (ProjectAccountRelation) Type() protoreflect.EnumType
- type ProjectInvite
- func (*ProjectInvite) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectInvite) GetCreatedAt() *timestamp.Timestamp
- func (x *ProjectInvite) GetEmail() string
- func (x *ProjectInvite) GetUpdatedAt() *timestamp.Timestamp
- func (*ProjectInvite) ProtoMessage()
- func (x *ProjectInvite) ProtoReflect() protoreflect.Message
- func (x *ProjectInvite) Reset()
- func (x *ProjectInvite) String() string
- type ProjectsClient
- type ProjectsServer
- type UnimplementedProjectsServer
- func (UnimplementedProjectsServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedProjectsServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedProjectsServer) Invite(context.Context, *InviteRequest) (*InviteResponse, error)
- func (UnimplementedProjectsServer) List(context.Context, *ListRequest) (*ListResponse, error)
- type UnsafeProjectsServer
Constants ¶
This section is empty.
Variables ¶
var ( ProjectAccountRelation_name = map[int32]string{ 0: "PROJECT_ACCOUNT_RELATION_UNSPECIFIED", 1: "PROJECT_ACCOUNT_RELATION_OWNER", 2: "PROJECT_ACCOUNT_RELATION_USER", } ProjectAccountRelation_value = map[string]int32{ "PROJECT_ACCOUNT_RELATION_UNSPECIFIED": 0, "PROJECT_ACCOUNT_RELATION_OWNER": 1, "PROJECT_ACCOUNT_RELATION_USER": 2, } )
Enum value maps for ProjectAccountRelation.
var File_api_projects_projects_proto protoreflect.FileDescriptor
var Projects_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.projects.Projects", HandlerType: (*ProjectsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Projects_Get_Handler, }, { MethodName: "Create", Handler: _Projects_Create_Handler, }, { MethodName: "List", Handler: _Projects_List_Handler, }, { MethodName: "Invite", Handler: _Projects_Invite_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/projects/projects.proto", }
Projects_ServiceDesc is the grpc.ServiceDesc for Projects service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProjectsHandler ¶
func RegisterProjectsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProjectsHandler registers the http handlers for service Projects to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProjectsHandlerClient ¶
func RegisterProjectsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectsClient) error
RegisterProjectsHandlerClient registers the http handlers for service Projects to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProjectsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProjectsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProjectsClient" to call the correct interceptors.
func RegisterProjectsHandlerFromEndpoint ¶
func RegisterProjectsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProjectsHandlerFromEndpoint is same as RegisterProjectsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProjectsHandlerServer ¶
func RegisterProjectsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProjectsServer) error
RegisterProjectsHandlerServer registers the http handlers for service Projects to "mux". UnaryRPC :call ProjectsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProjectsHandlerFromEndpoint instead.
func RegisterProjectsServer ¶
func RegisterProjectsServer(s grpc.ServiceRegistrar, srv ProjectsServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
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 { Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetProject ¶
func (x *CreateResponse) GetProject() *Project
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 GetRequest ¶
type GetRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetIds ¶
func (x *GetRequest) GetIds() []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 { Projects map[string]*Project `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetProjects ¶
func (x *GetResponse) GetProjects() map[string]*Project
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 InviteRequest ¶
type InviteRequest struct { ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*InviteRequest) Descriptor
deprecated
func (*InviteRequest) Descriptor() ([]byte, []int)
Deprecated: Use InviteRequest.ProtoReflect.Descriptor instead.
func (*InviteRequest) GetEmail ¶
func (x *InviteRequest) GetEmail() string
func (*InviteRequest) GetProjectId ¶
func (x *InviteRequest) GetProjectId() string
func (*InviteRequest) ProtoMessage ¶
func (*InviteRequest) ProtoMessage()
func (*InviteRequest) ProtoReflect ¶
func (x *InviteRequest) ProtoReflect() protoreflect.Message
func (*InviteRequest) Reset ¶
func (x *InviteRequest) Reset()
func (*InviteRequest) String ¶
func (x *InviteRequest) String() string
type InviteResponse ¶
type InviteResponse struct { Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // contains filtered or unexported fields }
func (*InviteResponse) Descriptor
deprecated
func (*InviteResponse) Descriptor() ([]byte, []int)
Deprecated: Use InviteResponse.ProtoReflect.Descriptor instead.
func (*InviteResponse) GetProject ¶
func (x *InviteResponse) GetProject() *Project
func (*InviteResponse) ProtoMessage ¶
func (*InviteResponse) ProtoMessage()
func (*InviteResponse) ProtoReflect ¶
func (x *InviteResponse) ProtoReflect() protoreflect.Message
func (*InviteResponse) Reset ¶
func (x *InviteResponse) Reset()
func (*InviteResponse) String ¶
func (x *InviteResponse) String() string
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
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 { Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetProjects ¶
func (x *ListResponse) GetProjects() []*Project
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 Project ¶
type Project struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Accounts []*ProjectAccount `protobuf:"bytes,4,rep,name=accounts,proto3" json:"accounts,omitempty"` Invites []*ProjectInvite `protobuf:"bytes,5,rep,name=invites,proto3" json:"invites,omitempty"` // Timestamps CreatedAt *timestamp.Timestamp `protobuf:"bytes,1000,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,1001,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Project) Descriptor
deprecated
func (*Project) GetAccounts ¶
func (x *Project) GetAccounts() []*ProjectAccount
func (*Project) GetCreatedAt ¶
func (*Project) GetInvites ¶
func (x *Project) GetInvites() []*ProjectInvite
func (*Project) GetUpdatedAt ¶
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
func (*Project) ProtoReflect ¶
func (x *Project) ProtoReflect() protoreflect.Message
type ProjectAccount ¶
type ProjectAccount struct { AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` Relation ProjectAccountRelation `protobuf:"varint,2,opt,name=relation,proto3,enum=api.projects.ProjectAccountRelation" json:"relation,omitempty"` // Timestamps CreatedAt *timestamp.Timestamp `protobuf:"bytes,1000,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,1001,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*ProjectAccount) Descriptor
deprecated
func (*ProjectAccount) Descriptor() ([]byte, []int)
Deprecated: Use ProjectAccount.ProtoReflect.Descriptor instead.
func (*ProjectAccount) GetAccountId ¶
func (x *ProjectAccount) GetAccountId() string
func (*ProjectAccount) GetCreatedAt ¶
func (x *ProjectAccount) GetCreatedAt() *timestamp.Timestamp
func (*ProjectAccount) GetRelation ¶
func (x *ProjectAccount) GetRelation() ProjectAccountRelation
func (*ProjectAccount) GetUpdatedAt ¶
func (x *ProjectAccount) GetUpdatedAt() *timestamp.Timestamp
func (*ProjectAccount) ProtoMessage ¶
func (*ProjectAccount) ProtoMessage()
func (*ProjectAccount) ProtoReflect ¶
func (x *ProjectAccount) ProtoReflect() protoreflect.Message
func (*ProjectAccount) Reset ¶
func (x *ProjectAccount) Reset()
func (*ProjectAccount) String ¶
func (x *ProjectAccount) String() string
type ProjectAccountRelation ¶
type ProjectAccountRelation int32
const ( ProjectAccountRelation_PROJECT_ACCOUNT_RELATION_UNSPECIFIED ProjectAccountRelation = 0 ProjectAccountRelation_PROJECT_ACCOUNT_RELATION_OWNER ProjectAccountRelation = 1 ProjectAccountRelation_PROJECT_ACCOUNT_RELATION_USER ProjectAccountRelation = 2 )
func (ProjectAccountRelation) Descriptor ¶
func (ProjectAccountRelation) Descriptor() protoreflect.EnumDescriptor
func (ProjectAccountRelation) Enum ¶
func (x ProjectAccountRelation) Enum() *ProjectAccountRelation
func (ProjectAccountRelation) EnumDescriptor
deprecated
func (ProjectAccountRelation) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProjectAccountRelation.Descriptor instead.
func (ProjectAccountRelation) Number ¶
func (x ProjectAccountRelation) Number() protoreflect.EnumNumber
func (ProjectAccountRelation) String ¶
func (x ProjectAccountRelation) String() string
func (ProjectAccountRelation) Type ¶
func (ProjectAccountRelation) Type() protoreflect.EnumType
type ProjectInvite ¶
type ProjectInvite struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // Timestamps CreatedAt *timestamp.Timestamp `protobuf:"bytes,1000,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,1001,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*ProjectInvite) Descriptor
deprecated
func (*ProjectInvite) Descriptor() ([]byte, []int)
Deprecated: Use ProjectInvite.ProtoReflect.Descriptor instead.
func (*ProjectInvite) GetCreatedAt ¶
func (x *ProjectInvite) GetCreatedAt() *timestamp.Timestamp
func (*ProjectInvite) GetEmail ¶
func (x *ProjectInvite) GetEmail() string
func (*ProjectInvite) GetUpdatedAt ¶
func (x *ProjectInvite) GetUpdatedAt() *timestamp.Timestamp
func (*ProjectInvite) ProtoMessage ¶
func (*ProjectInvite) ProtoMessage()
func (*ProjectInvite) ProtoReflect ¶
func (x *ProjectInvite) ProtoReflect() protoreflect.Message
func (*ProjectInvite) Reset ¶
func (x *ProjectInvite) Reset()
func (*ProjectInvite) String ¶
func (x *ProjectInvite) String() string
type ProjectsClient ¶
type ProjectsClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Invite(ctx context.Context, in *InviteRequest, opts ...grpc.CallOption) (*InviteResponse, error) }
ProjectsClient is the client API for Projects 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 NewProjectsClient ¶
func NewProjectsClient(cc grpc.ClientConnInterface) ProjectsClient
type ProjectsServer ¶
type ProjectsServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Create(context.Context, *CreateRequest) (*CreateResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Invite(context.Context, *InviteRequest) (*InviteResponse, error) // contains filtered or unexported methods }
ProjectsServer is the server API for Projects service. All implementations must embed UnimplementedProjectsServer for forward compatibility
type UnimplementedProjectsServer ¶
type UnimplementedProjectsServer struct { }
UnimplementedProjectsServer must be embedded to have forward compatible implementations.
func (UnimplementedProjectsServer) Create ¶
func (UnimplementedProjectsServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedProjectsServer) Get ¶
func (UnimplementedProjectsServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedProjectsServer) Invite ¶
func (UnimplementedProjectsServer) Invite(context.Context, *InviteRequest) (*InviteResponse, error)
func (UnimplementedProjectsServer) List ¶
func (UnimplementedProjectsServer) List(context.Context, *ListRequest) (*ListResponse, error)
type UnsafeProjectsServer ¶
type UnsafeProjectsServer interface {
// contains filtered or unexported methods
}
UnsafeProjectsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProjectsServer will result in compilation errors.