puzzlewikiservice

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

README

puzzlewikiservice

service description to store wiki content

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetCreatedAt added in v1.2.0

func (x *Content) GetCreatedAt() int64

func (*Content) GetText

func (x *Content) GetText() string

func (*Content) GetVersion

func (x *Content) GetVersion() uint64

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

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

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetSuccess added in v1.3.0

func (x *Response) GetSuccess() bool

func (*Response) GetVersion added in v1.3.0

func (x *Response) GetVersion() uint64

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

func (*Response) Reset added in v1.3.0

func (x *Response) Reset()

func (*Response) String added in v1.3.0

func (x *Response) String() string

type UnimplementedWikiServer

type UnimplementedWikiServer struct {
}

UnimplementedWikiServer must be embedded to have forward compatible implementations.

func (UnimplementedWikiServer) Delete

func (UnimplementedWikiServer) ListVersions

func (UnimplementedWikiServer) Load

func (UnimplementedWikiServer) Store

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) Descriptor() ([]byte, []int)

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetNumber added in v1.1.0

func (x *Version) GetNumber() uint64

func (*Version) GetUserId added in v1.1.0

func (x *Version) GetUserId() uint64

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

func (*Version) Reset added in v1.1.0

func (x *Version) Reset()

func (*Version) String added in v1.1.0

func (x *Version) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Versions.ProtoReflect.Descriptor instead.

func (*Versions) GetList

func (x *Versions) GetList() []*Version

func (*Versions) ProtoMessage

func (*Versions) ProtoMessage()

func (*Versions) ProtoReflect

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

func (*Versions) Reset

func (x *Versions) Reset()

func (*Versions) String

func (x *Versions) String() string

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

Jump to

Keyboard shortcuts

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