Documentation ¶
Index ¶
- Variables
- func RegisterWikiServer(s grpc.ServiceRegistrar, srv WikiServer)
- type Content
- func (*Content) Descriptor() ([]byte, []int)deprecated
- func (x *Content) GetCreatedAt() int64
- func (x *Content) GetText() string
- func (x *Content) GetVersion() uint64
- func (*Content) ProtoMessage()
- func (x *Content) ProtoReflect() protoreflect.Message
- func (x *Content) Reset()
- func (x *Content) String() string
- type ContentRequest
- func (*ContentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ContentRequest) GetLast() uint64
- func (x *ContentRequest) GetText() string
- func (x *ContentRequest) GetUserId() uint64
- func (x *ContentRequest) GetWikiId() uint64
- func (x *ContentRequest) GetWikiRef() string
- func (*ContentRequest) ProtoMessage()
- func (x *ContentRequest) ProtoReflect() protoreflect.Message
- func (x *ContentRequest) Reset()
- func (x *ContentRequest) String() string
- type Response
- type UnimplementedWikiServer
- func (UnimplementedWikiServer) Delete(context.Context, *WikiRequest) (*Response, error)
- func (UnimplementedWikiServer) ListVersions(context.Context, *VersionRequest) (*Versions, error)
- func (UnimplementedWikiServer) Load(context.Context, *WikiRequest) (*Content, error)
- func (UnimplementedWikiServer) Store(context.Context, *ContentRequest) (*Response, error)
- type UnsafeWikiServer
- type Version
- type VersionRequest
- func (*VersionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VersionRequest) GetWikiId() uint64
- func (x *VersionRequest) GetWikiRef() string
- func (*VersionRequest) ProtoMessage()
- func (x *VersionRequest) ProtoReflect() protoreflect.Message
- func (x *VersionRequest) Reset()
- func (x *VersionRequest) String() string
- type Versions
- type WikiClient
- type WikiRequest
- func (*WikiRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WikiRequest) GetVersion() uint64
- func (x *WikiRequest) GetWikiId() uint64
- func (x *WikiRequest) GetWikiRef() string
- func (*WikiRequest) ProtoMessage()
- func (x *WikiRequest) ProtoReflect() protoreflect.Message
- func (x *WikiRequest) Reset()
- func (x *WikiRequest) String() string
- type WikiServer
Constants ¶
This section is empty.
Variables ¶
var File_wiki_proto protoreflect.FileDescriptor
var Wiki_ServiceDesc = grpc.ServiceDesc{ ServiceName: "puzzlewikiservice.Wiki", HandlerType: (*WikiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Load", Handler: _Wiki_Load_Handler, }, { MethodName: "Store", Handler: _Wiki_Store_Handler, }, { MethodName: "ListVersions", Handler: _Wiki_ListVersions_Handler, }, { MethodName: "Delete", Handler: _Wiki_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "wiki.proto", }
Wiki_ServiceDesc is the grpc.ServiceDesc for Wiki service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWikiServer ¶
func RegisterWikiServer(s grpc.ServiceRegistrar, srv WikiServer)
Types ¶
type Content ¶
type Content struct { Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*Content) Descriptor
deprecated
func (*Content) GetCreatedAt ¶ added in v1.2.0
func (*Content) GetVersion ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶
func (x *Content) ProtoReflect() protoreflect.Message
type ContentRequest ¶
type ContentRequest struct { WikiId uint64 `protobuf:"varint,1,opt,name=wikiId,proto3" json:"wikiId,omitempty"` WikiRef string `protobuf:"bytes,2,opt,name=wikiRef,proto3" json:"wikiRef,omitempty"` Last uint64 `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"` Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` UserId uint64 `protobuf:"varint,5,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*ContentRequest) Descriptor
deprecated
func (*ContentRequest) Descriptor() ([]byte, []int)
Deprecated: Use ContentRequest.ProtoReflect.Descriptor instead.
func (*ContentRequest) GetLast ¶
func (x *ContentRequest) GetLast() uint64
func (*ContentRequest) GetText ¶
func (x *ContentRequest) GetText() string
func (*ContentRequest) GetUserId ¶ added in v1.1.0
func (x *ContentRequest) GetUserId() uint64
func (*ContentRequest) GetWikiId ¶
func (x *ContentRequest) GetWikiId() uint64
func (*ContentRequest) GetWikiRef ¶
func (x *ContentRequest) GetWikiRef() string
func (*ContentRequest) ProtoMessage ¶
func (*ContentRequest) ProtoMessage()
func (*ContentRequest) ProtoReflect ¶
func (x *ContentRequest) ProtoReflect() protoreflect.Message
func (*ContentRequest) Reset ¶
func (x *ContentRequest) Reset()
func (*ContentRequest) String ¶
func (x *ContentRequest) String() string
type Response ¶ added in v1.3.0
type Response struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
added in
v1.3.0
func (*Response) GetSuccess ¶ added in v1.3.0
func (*Response) GetVersion ¶ added in v1.3.0
func (*Response) ProtoMessage ¶ added in v1.3.0
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v1.3.0
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedWikiServer ¶
type UnimplementedWikiServer struct { }
UnimplementedWikiServer must be embedded to have forward compatible implementations.
func (UnimplementedWikiServer) Delete ¶
func (UnimplementedWikiServer) Delete(context.Context, *WikiRequest) (*Response, error)
func (UnimplementedWikiServer) ListVersions ¶
func (UnimplementedWikiServer) ListVersions(context.Context, *VersionRequest) (*Versions, error)
func (UnimplementedWikiServer) Load ¶
func (UnimplementedWikiServer) Load(context.Context, *WikiRequest) (*Content, error)
func (UnimplementedWikiServer) Store ¶
func (UnimplementedWikiServer) Store(context.Context, *ContentRequest) (*Response, error)
type UnsafeWikiServer ¶
type UnsafeWikiServer interface {
// contains filtered or unexported methods
}
UnsafeWikiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WikiServer will result in compilation errors.
type Version ¶ added in v1.1.0
type Version struct { Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` UserId uint64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*Version) Descriptor
deprecated
added in
v1.1.0
func (*Version) ProtoMessage ¶ added in v1.1.0
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶ added in v1.1.0
func (x *Version) ProtoReflect() protoreflect.Message
type VersionRequest ¶
type VersionRequest struct { WikiId uint64 `protobuf:"varint,1,opt,name=wikiId,proto3" json:"wikiId,omitempty"` WikiRef string `protobuf:"bytes,2,opt,name=wikiRef,proto3" json:"wikiRef,omitempty"` // contains filtered or unexported fields }
func (*VersionRequest) Descriptor
deprecated
func (*VersionRequest) Descriptor() ([]byte, []int)
Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
func (*VersionRequest) GetWikiId ¶
func (x *VersionRequest) GetWikiId() uint64
func (*VersionRequest) GetWikiRef ¶
func (x *VersionRequest) GetWikiRef() string
func (*VersionRequest) ProtoMessage ¶
func (*VersionRequest) ProtoMessage()
func (*VersionRequest) ProtoReflect ¶
func (x *VersionRequest) ProtoReflect() protoreflect.Message
func (*VersionRequest) Reset ¶
func (x *VersionRequest) Reset()
func (*VersionRequest) String ¶
func (x *VersionRequest) String() string
type Versions ¶
type Versions struct { List []*Version `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func (*Versions) Descriptor
deprecated
func (*Versions) ProtoMessage ¶
func (*Versions) ProtoMessage()
func (*Versions) ProtoReflect ¶
func (x *Versions) ProtoReflect() protoreflect.Message
type WikiClient ¶
type WikiClient interface { Load(ctx context.Context, in *WikiRequest, opts ...grpc.CallOption) (*Content, error) Store(ctx context.Context, in *ContentRequest, opts ...grpc.CallOption) (*Response, error) ListVersions(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*Versions, error) Delete(ctx context.Context, in *WikiRequest, opts ...grpc.CallOption) (*Response, error) }
WikiClient is the client API for Wiki 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 NewWikiClient ¶
func NewWikiClient(cc grpc.ClientConnInterface) WikiClient
type WikiRequest ¶
type WikiRequest struct { WikiId uint64 `protobuf:"varint,1,opt,name=wikiId,proto3" json:"wikiId,omitempty"` WikiRef string `protobuf:"bytes,2,opt,name=wikiRef,proto3" json:"wikiRef,omitempty"` Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*WikiRequest) Descriptor
deprecated
func (*WikiRequest) Descriptor() ([]byte, []int)
Deprecated: Use WikiRequest.ProtoReflect.Descriptor instead.
func (*WikiRequest) GetVersion ¶
func (x *WikiRequest) GetVersion() uint64
func (*WikiRequest) GetWikiId ¶
func (x *WikiRequest) GetWikiId() uint64
func (*WikiRequest) GetWikiRef ¶
func (x *WikiRequest) GetWikiRef() string
func (*WikiRequest) ProtoMessage ¶
func (*WikiRequest) ProtoMessage()
func (*WikiRequest) ProtoReflect ¶
func (x *WikiRequest) ProtoReflect() protoreflect.Message
func (*WikiRequest) Reset ¶
func (x *WikiRequest) Reset()
func (*WikiRequest) String ¶
func (x *WikiRequest) String() string
type WikiServer ¶
type WikiServer interface { Load(context.Context, *WikiRequest) (*Content, error) Store(context.Context, *ContentRequest) (*Response, error) ListVersions(context.Context, *VersionRequest) (*Versions, error) Delete(context.Context, *WikiRequest) (*Response, error) // contains filtered or unexported methods }
WikiServer is the server API for Wiki service. All implementations must embed UnimplementedWikiServer for forward compatibility