twooterpb

package
v0.0.0-...-20d4045 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_resource_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var Twooter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "twooter.Twooter",
	HandlerType: (*TwooterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTwoot",
			Handler:    _Twooter_CreateTwoot_Handler,
		},
		{
			MethodName: "ListTwoots",
			Handler:    _Twooter_ListTwoots_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

Twooter_ServiceDesc is the grpc.ServiceDesc for Twooter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTwooterServer

func RegisterTwooterServer(s grpc.ServiceRegistrar, srv TwooterServer)

Types

type CreateTwootRequest

type CreateTwootRequest struct {

	// Twoot to create.
	Twoot *Twoot `protobuf:"bytes,1,opt,name=twoot,proto3" json:"twoot,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTwootRequest) Descriptor deprecated

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

Deprecated: Use CreateTwootRequest.ProtoReflect.Descriptor instead.

func (*CreateTwootRequest) GetTwoot

func (x *CreateTwootRequest) GetTwoot() *Twoot

func (*CreateTwootRequest) ProtoMessage

func (*CreateTwootRequest) ProtoMessage()

func (*CreateTwootRequest) ProtoReflect

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

func (*CreateTwootRequest) Reset

func (x *CreateTwootRequest) Reset()

func (*CreateTwootRequest) String

func (x *CreateTwootRequest) String() string

type ListTwootsRequest

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

func (*ListTwootsRequest) Descriptor deprecated

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

Deprecated: Use ListTwootsRequest.ProtoReflect.Descriptor instead.

func (*ListTwootsRequest) ProtoMessage

func (*ListTwootsRequest) ProtoMessage()

func (*ListTwootsRequest) ProtoReflect

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

func (*ListTwootsRequest) Reset

func (x *ListTwootsRequest) Reset()

func (*ListTwootsRequest) String

func (x *ListTwootsRequest) String() string

type ListTwootsResponse

type ListTwootsResponse struct {

	// The Twoots.
	Twoots []*Twoot `protobuf:"bytes,1,rep,name=twoots,proto3" json:"twoots,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTwootsResponse) Descriptor deprecated

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

Deprecated: Use ListTwootsResponse.ProtoReflect.Descriptor instead.

func (*ListTwootsResponse) GetTwoots

func (x *ListTwootsResponse) GetTwoots() []*Twoot

func (*ListTwootsResponse) ProtoMessage

func (*ListTwootsResponse) ProtoMessage()

func (*ListTwootsResponse) ProtoReflect

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

func (*ListTwootsResponse) Reset

func (x *ListTwootsResponse) Reset()

func (*ListTwootsResponse) String

func (x *ListTwootsResponse) String() string

type Twoot

type Twoot struct {

	// Unique identifier of the Twoot.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Creator of the Twoot.
	Creator *User `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
	// Time the Twoot was created at.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Message of the Twoot.
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Twoot) Descriptor deprecated

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

Deprecated: Use Twoot.ProtoReflect.Descriptor instead.

func (*Twoot) GetCreateTime

func (x *Twoot) GetCreateTime() *timestamppb.Timestamp

func (*Twoot) GetCreator

func (x *Twoot) GetCreator() *User

func (*Twoot) GetId

func (x *Twoot) GetId() string

func (*Twoot) GetMessage

func (x *Twoot) GetMessage() string

func (*Twoot) ProtoMessage

func (*Twoot) ProtoMessage()

func (*Twoot) ProtoReflect

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

func (*Twoot) Reset

func (x *Twoot) Reset()

func (*Twoot) String

func (x *Twoot) String() string

type TwooterClient

type TwooterClient interface {
	// Creates a Twoot.
	CreateTwoot(ctx context.Context, in *CreateTwootRequest, opts ...grpc.CallOption) (*Twoot, error)
	// List all Twoots.
	ListTwoots(ctx context.Context, in *ListTwootsRequest, opts ...grpc.CallOption) (*ListTwootsResponse, error)
}

TwooterClient is the client API for Twooter 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 NewTwooterClient

func NewTwooterClient(cc grpc.ClientConnInterface) TwooterClient

type TwooterServer

type TwooterServer interface {
	// Creates a Twoot.
	CreateTwoot(context.Context, *CreateTwootRequest) (*Twoot, error)
	// List all Twoots.
	ListTwoots(context.Context, *ListTwootsRequest) (*ListTwootsResponse, error)
	// contains filtered or unexported methods
}

TwooterServer is the server API for Twooter service. All implementations must embed UnimplementedTwooterServer for forward compatibility

type UnimplementedTwooterServer

type UnimplementedTwooterServer struct {
}

UnimplementedTwooterServer must be embedded to have forward compatible implementations.

func (UnimplementedTwooterServer) CreateTwoot

func (UnimplementedTwooterServer) ListTwoots

type UnsafeTwooterServer

type UnsafeTwooterServer interface {
	// contains filtered or unexported methods
}

UnsafeTwooterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TwooterServer will result in compilation errors.

type User

type User struct {

	// Unique identifier of a User.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Public handle of the User.
	Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"`
	// Email address of the User.
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetHandle

func (x *User) GetHandle() string

func (*User) GetId

func (x *User) GetId() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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