Documentation ¶
Overview ¶
Package contributorsv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterContributorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterContributorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ContributorServiceClient) error
- func RegisterContributorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterContributorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ContributorServiceServer) error
- func RegisterContributorServiceServer(s grpc.ServiceRegistrar, srv ContributorServiceServer)
- type Contributor
- func (*Contributor) Descriptor() ([]byte, []int)deprecated
- func (x *Contributor) GetEmail() string
- func (x *Contributor) GetId() string
- func (x *Contributor) GetProductId() string
- func (x *Contributor) GetRole() Role
- func (*Contributor) ProtoMessage()
- func (x *Contributor) ProtoReflect() protoreflect.Message
- func (x *Contributor) Reset()
- func (x *Contributor) String() string
- type ContributorServiceClient
- type ContributorServiceServer
- type InviteRequest
- type InviteResponse
- type ListRequest
- type ListResponse
- type RevokeRequest
- func (*RevokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RevokeRequest) GetContributorId() string
- func (x *RevokeRequest) GetProductId() string
- func (*RevokeRequest) ProtoMessage()
- func (x *RevokeRequest) ProtoReflect() protoreflect.Message
- func (x *RevokeRequest) Reset()
- func (x *RevokeRequest) String() string
- type RevokeResponse
- type Role
- type UnimplementedContributorServiceServer
- func (UnimplementedContributorServiceServer) Invite(context.Context, *InviteRequest) (*InviteResponse, error)
- func (UnimplementedContributorServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedContributorServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error)
- func (UnimplementedContributorServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeContributorServiceServer
- type UpdateRequest
- type UpdateResponse
Constants ¶
const ( ContributorService_List_FullMethodName = "/contributors.v1.ContributorService/List" ContributorService_Invite_FullMethodName = "/contributors.v1.ContributorService/Invite" ContributorService_Update_FullMethodName = "/contributors.v1.ContributorService/Update" ContributorService_Revoke_FullMethodName = "/contributors.v1.ContributorService/Revoke" )
Variables ¶
var ( Role_name = map[int32]string{ 0: "ROLE_UNSPECIFIED", 1: "ROLE_OWNER", } Role_value = map[string]int32{ "ROLE_UNSPECIFIED": 0, "ROLE_OWNER": 1, } )
Enum value maps for Role.
var ContributorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contributors.v1.ContributorService", HandlerType: (*ContributorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _ContributorService_List_Handler, }, { MethodName: "Invite", Handler: _ContributorService_Invite_Handler, }, { MethodName: "Update", Handler: _ContributorService_Update_Handler, }, { MethodName: "Revoke", Handler: _ContributorService_Revoke_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "contributors/v1/service.proto", }
ContributorService_ServiceDesc is the grpc.ServiceDesc for ContributorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_contributors_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterContributorServiceHandler ¶
func RegisterContributorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterContributorServiceHandler registers the http handlers for service ContributorService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterContributorServiceHandlerClient ¶
func RegisterContributorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ContributorServiceClient) error
RegisterContributorServiceHandlerClient registers the http handlers for service ContributorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ContributorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ContributorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ContributorServiceClient" to call the correct interceptors.
func RegisterContributorServiceHandlerFromEndpoint ¶
func RegisterContributorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterContributorServiceHandlerFromEndpoint is same as RegisterContributorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterContributorServiceHandlerServer ¶
func RegisterContributorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ContributorServiceServer) error
RegisterContributorServiceHandlerServer registers the http handlers for service ContributorService to "mux". UnaryRPC :call ContributorServiceServer 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 RegisterContributorServiceHandlerFromEndpoint instead.
func RegisterContributorServiceServer ¶
func RegisterContributorServiceServer(s grpc.ServiceRegistrar, srv ContributorServiceServer)
Types ¶
type Contributor ¶
type Contributor struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=contributors.v1.Role" json:"role,omitempty"` // contains filtered or unexported fields }
func (*Contributor) Descriptor
deprecated
func (*Contributor) Descriptor() ([]byte, []int)
Deprecated: Use Contributor.ProtoReflect.Descriptor instead.
func (*Contributor) GetEmail ¶
func (x *Contributor) GetEmail() string
func (*Contributor) GetId ¶
func (x *Contributor) GetId() string
func (*Contributor) GetProductId ¶
func (x *Contributor) GetProductId() string
func (*Contributor) GetRole ¶
func (x *Contributor) GetRole() Role
func (*Contributor) ProtoMessage ¶
func (*Contributor) ProtoMessage()
func (*Contributor) ProtoReflect ¶
func (x *Contributor) ProtoReflect() protoreflect.Message
func (*Contributor) Reset ¶
func (x *Contributor) Reset()
func (*Contributor) String ¶
func (x *Contributor) String() string
type ContributorServiceClient ¶
type ContributorServiceClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Invite(ctx context.Context, in *InviteRequest, opts ...grpc.CallOption) (*InviteResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) }
ContributorServiceClient is the client API for ContributorService 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 NewContributorServiceClient ¶
func NewContributorServiceClient(cc grpc.ClientConnInterface) ContributorServiceClient
type ContributorServiceServer ¶
type ContributorServiceServer interface { List(context.Context, *ListRequest) (*ListResponse, error) Invite(context.Context, *InviteRequest) (*InviteResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) // contains filtered or unexported methods }
ContributorServiceServer is the server API for ContributorService service. All implementations must embed UnimplementedContributorServiceServer for forward compatibility
type InviteRequest ¶
type InviteRequest struct { Contributor *Contributor `protobuf:"bytes,1,opt,name=contributor,proto3" json:"contributor,omitempty"` // contains filtered or unexported fields }
func (*InviteRequest) Descriptor
deprecated
func (*InviteRequest) Descriptor() ([]byte, []int)
Deprecated: Use InviteRequest.ProtoReflect.Descriptor instead.
func (*InviteRequest) GetContributor ¶
func (x *InviteRequest) GetContributor() *Contributor
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 {
// contains filtered or unexported fields
}
func (*InviteResponse) Descriptor
deprecated
func (*InviteResponse) Descriptor() ([]byte, []int)
Deprecated: Use InviteResponse.ProtoReflect.Descriptor instead.
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 { ProductId string `protobuf:"bytes,5,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetProductId ¶
func (x *ListRequest) GetProductId() string
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 { Contributors []*Contributor `protobuf:"bytes,5,rep,name=contributors,proto3" json:"contributors,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetContributors ¶
func (x *ListResponse) GetContributors() []*Contributor
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 RevokeRequest ¶
type RevokeRequest struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` ContributorId string `protobuf:"bytes,2,opt,name=contributor_id,json=contributorId,proto3" json:"contributor_id,omitempty"` // contains filtered or unexported fields }
func (*RevokeRequest) Descriptor
deprecated
func (*RevokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RevokeRequest.ProtoReflect.Descriptor instead.
func (*RevokeRequest) GetContributorId ¶
func (x *RevokeRequest) GetContributorId() string
func (*RevokeRequest) GetProductId ¶
func (x *RevokeRequest) GetProductId() 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
}
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 int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type UnimplementedContributorServiceServer ¶
type UnimplementedContributorServiceServer struct { }
UnimplementedContributorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedContributorServiceServer) Invite ¶
func (UnimplementedContributorServiceServer) Invite(context.Context, *InviteRequest) (*InviteResponse, error)
func (UnimplementedContributorServiceServer) List ¶
func (UnimplementedContributorServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedContributorServiceServer) Revoke ¶
func (UnimplementedContributorServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error)
func (UnimplementedContributorServiceServer) Update ¶
func (UnimplementedContributorServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeContributorServiceServer ¶
type UnsafeContributorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeContributorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ContributorServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Contributor *Contributor `protobuf:"bytes,1,opt,name=contributor,proto3" json:"contributor,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetContributor ¶
func (x *UpdateRequest) GetContributor() *Contributor
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
}
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