projectsvc

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package projectsvc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_projectsvc_svc_proto protoreflect.FileDescriptor
View Source
var Projects_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "autokitteh.projectsvc.Projects",
	HandlerType: (*ProjectsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateProject",
			Handler:    _Projects_CreateProject_Handler,
		},
		{
			MethodName: "UpdateProject",
			Handler:    _Projects_UpdateProject_Handler,
		},
		{
			MethodName: "GetProject",
			Handler:    _Projects_GetProject_Handler,
		},
		{
			MethodName: "GetProjects",
			Handler:    _Projects_GetProjects_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "projectsvc/svc.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 CreateProjectRequest

type CreateProjectRequest struct {
	AccountName string                   `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	Id          string                   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Settings    *project.ProjectSettings `protobuf:"bytes,3,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateProjectRequest) Descriptor deprecated

func (*CreateProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead.

func (*CreateProjectRequest) GetAccountName

func (x *CreateProjectRequest) GetAccountName() string

func (*CreateProjectRequest) GetId

func (x *CreateProjectRequest) GetId() string

func (*CreateProjectRequest) GetSettings

func (x *CreateProjectRequest) GetSettings() *project.ProjectSettings

func (*CreateProjectRequest) ProtoMessage

func (*CreateProjectRequest) ProtoMessage()

func (*CreateProjectRequest) ProtoReflect

func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message

func (*CreateProjectRequest) Reset

func (x *CreateProjectRequest) Reset()

func (*CreateProjectRequest) String

func (x *CreateProjectRequest) String() string

func (*CreateProjectRequest) Validate

func (m *CreateProjectRequest) Validate() error

Validate checks the field values on CreateProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreateProjectRequestValidationError

type CreateProjectRequestValidationError struct {
	// contains filtered or unexported fields
}

CreateProjectRequestValidationError is the validation error returned by CreateProjectRequest.Validate if the designated constraints aren't met.

func (CreateProjectRequestValidationError) Cause

Cause function returns cause value.

func (CreateProjectRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateProjectRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateProjectRequestValidationError) Field

Field function returns field value.

func (CreateProjectRequestValidationError) Key

Key function returns key value.

func (CreateProjectRequestValidationError) Reason

Reason function returns reason value.

type CreateProjectResponse

type CreateProjectResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateProjectResponse) Descriptor deprecated

func (*CreateProjectResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateProjectResponse.ProtoReflect.Descriptor instead.

func (*CreateProjectResponse) GetId

func (x *CreateProjectResponse) GetId() string

func (*CreateProjectResponse) ProtoMessage

func (*CreateProjectResponse) ProtoMessage()

func (*CreateProjectResponse) ProtoReflect

func (x *CreateProjectResponse) ProtoReflect() protoreflect.Message

func (*CreateProjectResponse) Reset

func (x *CreateProjectResponse) Reset()

func (*CreateProjectResponse) String

func (x *CreateProjectResponse) String() string

func (*CreateProjectResponse) Validate

func (m *CreateProjectResponse) Validate() error

Validate checks the field values on CreateProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreateProjectResponseValidationError

type CreateProjectResponseValidationError struct {
	// contains filtered or unexported fields
}

CreateProjectResponseValidationError is the validation error returned by CreateProjectResponse.Validate if the designated constraints aren't met.

func (CreateProjectResponseValidationError) Cause

Cause function returns cause value.

func (CreateProjectResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateProjectResponseValidationError) ErrorName

ErrorName returns error name.

func (CreateProjectResponseValidationError) Field

Field function returns field value.

func (CreateProjectResponseValidationError) Key

Key function returns key value.

func (CreateProjectResponseValidationError) Reason

Reason function returns reason value.

type GetProjectRequest

type GetProjectRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectRequest) Descriptor deprecated

func (*GetProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead.

func (*GetProjectRequest) GetId

func (x *GetProjectRequest) GetId() string

func (*GetProjectRequest) ProtoMessage

func (*GetProjectRequest) ProtoMessage()

func (*GetProjectRequest) ProtoReflect

func (x *GetProjectRequest) ProtoReflect() protoreflect.Message

func (*GetProjectRequest) Reset

func (x *GetProjectRequest) Reset()

func (*GetProjectRequest) String

func (x *GetProjectRequest) String() string

func (*GetProjectRequest) Validate

func (m *GetProjectRequest) Validate() error

Validate checks the field values on GetProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetProjectRequestValidationError

type GetProjectRequestValidationError struct {
	// contains filtered or unexported fields
}

GetProjectRequestValidationError is the validation error returned by GetProjectRequest.Validate if the designated constraints aren't met.

func (GetProjectRequestValidationError) Cause

Cause function returns cause value.

func (GetProjectRequestValidationError) Error

Error satisfies the builtin error interface

func (GetProjectRequestValidationError) ErrorName

ErrorName returns error name.

func (GetProjectRequestValidationError) Field

Field function returns field value.

func (GetProjectRequestValidationError) Key

Key function returns key value.

func (GetProjectRequestValidationError) Reason

Reason function returns reason value.

type GetProjectResponse

type GetProjectResponse struct {
	Project *project.Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectResponse) Descriptor deprecated

func (*GetProjectResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetProjectResponse.ProtoReflect.Descriptor instead.

func (*GetProjectResponse) GetProject

func (x *GetProjectResponse) GetProject() *project.Project

func (*GetProjectResponse) ProtoMessage

func (*GetProjectResponse) ProtoMessage()

func (*GetProjectResponse) ProtoReflect

func (x *GetProjectResponse) ProtoReflect() protoreflect.Message

func (*GetProjectResponse) Reset

func (x *GetProjectResponse) Reset()

func (*GetProjectResponse) String

func (x *GetProjectResponse) String() string

func (*GetProjectResponse) Validate

func (m *GetProjectResponse) Validate() error

Validate checks the field values on GetProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetProjectResponseValidationError

type GetProjectResponseValidationError struct {
	// contains filtered or unexported fields
}

GetProjectResponseValidationError is the validation error returned by GetProjectResponse.Validate if the designated constraints aren't met.

func (GetProjectResponseValidationError) Cause

Cause function returns cause value.

func (GetProjectResponseValidationError) Error

Error satisfies the builtin error interface

func (GetProjectResponseValidationError) ErrorName

ErrorName returns error name.

func (GetProjectResponseValidationError) Field

Field function returns field value.

func (GetProjectResponseValidationError) Key

Key function returns key value.

func (GetProjectResponseValidationError) Reason

Reason function returns reason value.

type GetProjectsRequest

type GetProjectsRequest struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectsRequest) Descriptor deprecated

func (*GetProjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetProjectsRequest.ProtoReflect.Descriptor instead.

func (*GetProjectsRequest) GetIds

func (x *GetProjectsRequest) GetIds() []string

func (*GetProjectsRequest) ProtoMessage

func (*GetProjectsRequest) ProtoMessage()

func (*GetProjectsRequest) ProtoReflect

func (x *GetProjectsRequest) ProtoReflect() protoreflect.Message

func (*GetProjectsRequest) Reset

func (x *GetProjectsRequest) Reset()

func (*GetProjectsRequest) String

func (x *GetProjectsRequest) String() string

func (*GetProjectsRequest) Validate

func (m *GetProjectsRequest) Validate() error

Validate checks the field values on GetProjectsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetProjectsRequestValidationError

type GetProjectsRequestValidationError struct {
	// contains filtered or unexported fields
}

GetProjectsRequestValidationError is the validation error returned by GetProjectsRequest.Validate if the designated constraints aren't met.

func (GetProjectsRequestValidationError) Cause

Cause function returns cause value.

func (GetProjectsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetProjectsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetProjectsRequestValidationError) Field

Field function returns field value.

func (GetProjectsRequestValidationError) Key

Key function returns key value.

func (GetProjectsRequestValidationError) Reason

Reason function returns reason value.

type GetProjectsResponse

type GetProjectsResponse struct {
	Projects []*project.Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectsResponse) Descriptor deprecated

func (*GetProjectsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetProjectsResponse.ProtoReflect.Descriptor instead.

func (*GetProjectsResponse) GetProjects

func (x *GetProjectsResponse) GetProjects() []*project.Project

func (*GetProjectsResponse) ProtoMessage

func (*GetProjectsResponse) ProtoMessage()

func (*GetProjectsResponse) ProtoReflect

func (x *GetProjectsResponse) ProtoReflect() protoreflect.Message

func (*GetProjectsResponse) Reset

func (x *GetProjectsResponse) Reset()

func (*GetProjectsResponse) String

func (x *GetProjectsResponse) String() string

func (*GetProjectsResponse) Validate

func (m *GetProjectsResponse) Validate() error

Validate checks the field values on GetProjectsResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetProjectsResponseValidationError

type GetProjectsResponseValidationError struct {
	// contains filtered or unexported fields
}

GetProjectsResponseValidationError is the validation error returned by GetProjectsResponse.Validate if the designated constraints aren't met.

func (GetProjectsResponseValidationError) Cause

Cause function returns cause value.

func (GetProjectsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetProjectsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetProjectsResponseValidationError) Field

Field function returns field value.

func (GetProjectsResponseValidationError) Key

Key function returns key value.

func (GetProjectsResponseValidationError) Reason

Reason function returns reason value.

type ProjectsClient

type ProjectsClient interface {
	CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*CreateProjectResponse, error)
	UpdateProject(ctx context.Context, in *UpdateProjectRequest, opts ...grpc.CallOption) (*UpdateProjectResponse, error)
	GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*GetProjectResponse, error)
	GetProjects(ctx context.Context, in *GetProjectsRequest, opts ...grpc.CallOption) (*GetProjectsResponse, 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 {
	CreateProject(context.Context, *CreateProjectRequest) (*CreateProjectResponse, error)
	UpdateProject(context.Context, *UpdateProjectRequest) (*UpdateProjectResponse, error)
	GetProject(context.Context, *GetProjectRequest) (*GetProjectResponse, error)
	GetProjects(context.Context, *GetProjectsRequest) (*GetProjectsResponse, error)
	// contains filtered or unexported methods
}

ProjectsServer is the server API for Projects service. All implementations must embed UnimplementedProjectsServer for forward compatibility

type RemoveProjectRequest

type RemoveProjectRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveProjectRequest) Descriptor deprecated

func (*RemoveProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use RemoveProjectRequest.ProtoReflect.Descriptor instead.

func (*RemoveProjectRequest) GetId

func (x *RemoveProjectRequest) GetId() string

func (*RemoveProjectRequest) ProtoMessage

func (*RemoveProjectRequest) ProtoMessage()

func (*RemoveProjectRequest) ProtoReflect

func (x *RemoveProjectRequest) ProtoReflect() protoreflect.Message

func (*RemoveProjectRequest) Reset

func (x *RemoveProjectRequest) Reset()

func (*RemoveProjectRequest) String

func (x *RemoveProjectRequest) String() string

func (*RemoveProjectRequest) Validate

func (m *RemoveProjectRequest) Validate() error

Validate checks the field values on RemoveProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RemoveProjectRequestValidationError

type RemoveProjectRequestValidationError struct {
	// contains filtered or unexported fields
}

RemoveProjectRequestValidationError is the validation error returned by RemoveProjectRequest.Validate if the designated constraints aren't met.

func (RemoveProjectRequestValidationError) Cause

Cause function returns cause value.

func (RemoveProjectRequestValidationError) Error

Error satisfies the builtin error interface

func (RemoveProjectRequestValidationError) ErrorName

ErrorName returns error name.

func (RemoveProjectRequestValidationError) Field

Field function returns field value.

func (RemoveProjectRequestValidationError) Key

Key function returns key value.

func (RemoveProjectRequestValidationError) Reason

Reason function returns reason value.

type RemoveProjectResponse

type RemoveProjectResponse struct {
	// contains filtered or unexported fields
}

func (*RemoveProjectResponse) Descriptor deprecated

func (*RemoveProjectResponse) Descriptor() ([]byte, []int)

Deprecated: Use RemoveProjectResponse.ProtoReflect.Descriptor instead.

func (*RemoveProjectResponse) ProtoMessage

func (*RemoveProjectResponse) ProtoMessage()

func (*RemoveProjectResponse) ProtoReflect

func (x *RemoveProjectResponse) ProtoReflect() protoreflect.Message

func (*RemoveProjectResponse) Reset

func (x *RemoveProjectResponse) Reset()

func (*RemoveProjectResponse) String

func (x *RemoveProjectResponse) String() string

func (*RemoveProjectResponse) Validate

func (m *RemoveProjectResponse) Validate() error

Validate checks the field values on RemoveProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RemoveProjectResponseValidationError

type RemoveProjectResponseValidationError struct {
	// contains filtered or unexported fields
}

RemoveProjectResponseValidationError is the validation error returned by RemoveProjectResponse.Validate if the designated constraints aren't met.

func (RemoveProjectResponseValidationError) Cause

Cause function returns cause value.

func (RemoveProjectResponseValidationError) Error

Error satisfies the builtin error interface

func (RemoveProjectResponseValidationError) ErrorName

ErrorName returns error name.

func (RemoveProjectResponseValidationError) Field

Field function returns field value.

func (RemoveProjectResponseValidationError) Key

Key function returns key value.

func (RemoveProjectResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedProjectsServer

type UnimplementedProjectsServer struct {
}

UnimplementedProjectsServer must be embedded to have forward compatible implementations.

func (UnimplementedProjectsServer) CreateProject

func (UnimplementedProjectsServer) GetProject

func (UnimplementedProjectsServer) GetProjects

func (UnimplementedProjectsServer) UpdateProject

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.

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Id       string                   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Settings *project.ProjectSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateProjectRequest) Descriptor deprecated

func (*UpdateProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateProjectRequest.ProtoReflect.Descriptor instead.

func (*UpdateProjectRequest) GetId

func (x *UpdateProjectRequest) GetId() string

func (*UpdateProjectRequest) GetSettings

func (x *UpdateProjectRequest) GetSettings() *project.ProjectSettings

func (*UpdateProjectRequest) ProtoMessage

func (*UpdateProjectRequest) ProtoMessage()

func (*UpdateProjectRequest) ProtoReflect

func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message

func (*UpdateProjectRequest) Reset

func (x *UpdateProjectRequest) Reset()

func (*UpdateProjectRequest) String

func (x *UpdateProjectRequest) String() string

func (*UpdateProjectRequest) Validate

func (m *UpdateProjectRequest) Validate() error

Validate checks the field values on UpdateProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdateProjectRequestValidationError

type UpdateProjectRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateProjectRequestValidationError is the validation error returned by UpdateProjectRequest.Validate if the designated constraints aren't met.

func (UpdateProjectRequestValidationError) Cause

Cause function returns cause value.

func (UpdateProjectRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateProjectRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateProjectRequestValidationError) Field

Field function returns field value.

func (UpdateProjectRequestValidationError) Key

Key function returns key value.

func (UpdateProjectRequestValidationError) Reason

Reason function returns reason value.

type UpdateProjectResponse

type UpdateProjectResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateProjectResponse) Descriptor deprecated

func (*UpdateProjectResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateProjectResponse.ProtoReflect.Descriptor instead.

func (*UpdateProjectResponse) ProtoMessage

func (*UpdateProjectResponse) ProtoMessage()

func (*UpdateProjectResponse) ProtoReflect

func (x *UpdateProjectResponse) ProtoReflect() protoreflect.Message

func (*UpdateProjectResponse) Reset

func (x *UpdateProjectResponse) Reset()

func (*UpdateProjectResponse) String

func (x *UpdateProjectResponse) String() string

func (*UpdateProjectResponse) Validate

func (m *UpdateProjectResponse) Validate() error

Validate checks the field values on UpdateProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdateProjectResponseValidationError

type UpdateProjectResponseValidationError struct {
	// contains filtered or unexported fields
}

UpdateProjectResponseValidationError is the validation error returned by UpdateProjectResponse.Validate if the designated constraints aren't met.

func (UpdateProjectResponseValidationError) Cause

Cause function returns cause value.

func (UpdateProjectResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateProjectResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdateProjectResponseValidationError) Field

Field function returns field value.

func (UpdateProjectResponseValidationError) Key

Key function returns key value.

func (UpdateProjectResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL