v1

package
v0.0.0-...-c2164b1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Apigw_Register_FullMethodName      = "/apigw.v1.Apigw/Register"
	Apigw_Login_FullMethodName         = "/apigw.v1.Apigw/Login"
	Apigw_CreateArticle_FullMethodName = "/apigw.v1.Apigw/CreateArticle"
	Apigw_GetArticle_FullMethodName    = "/apigw.v1.Apigw/GetArticle"
	Apigw_ListArticle_FullMethodName   = "/apigw.v1.Apigw/ListArticle"
	Apigw_UpdateArticle_FullMethodName = "/apigw.v1.Apigw/UpdateArticle"
	Apigw_DeleteArticle_FullMethodName = "/apigw.v1.Apigw/DeleteArticle"
)
View Source
const OperationApigwCreateArticle = "/apigw.v1.Apigw/CreateArticle"
View Source
const OperationApigwDeleteArticle = "/apigw.v1.Apigw/DeleteArticle"
View Source
const OperationApigwGetArticle = "/apigw.v1.Apigw/GetArticle"
View Source
const OperationApigwListArticle = "/apigw.v1.Apigw/ListArticle"
View Source
const OperationApigwLogin = "/apigw.v1.Apigw/Login"
View Source
const OperationApigwRegister = "/apigw.v1.Apigw/Register"
View Source
const OperationApigwUpdateArticle = "/apigw.v1.Apigw/UpdateArticle"

Variables

View Source
var Apigw_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "apigw.v1.Apigw",
	HandlerType: (*ApigwServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Apigw_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Apigw_Login_Handler,
		},
		{
			MethodName: "CreateArticle",
			Handler:    _Apigw_CreateArticle_Handler,
		},
		{
			MethodName: "GetArticle",
			Handler:    _Apigw_GetArticle_Handler,
		},
		{
			MethodName: "ListArticle",
			Handler:    _Apigw_ListArticle_Handler,
		},
		{
			MethodName: "UpdateArticle",
			Handler:    _Apigw_UpdateArticle_Handler,
		},
		{
			MethodName: "DeleteArticle",
			Handler:    _Apigw_DeleteArticle_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apigw/v1/apigw.proto",
}

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

View Source
var File_apigw_v1_apigw_proto protoreflect.FileDescriptor

Functions

func RegisterApigwHTTPServer

func RegisterApigwHTTPServer(s *http.Server, srv ApigwHTTPServer)

func RegisterApigwServer

func RegisterApigwServer(s grpc.ServiceRegistrar, srv ApigwServer)

Types

type ApigwClient

type ApigwClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*ReturnTokenReply, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*ReturnTokenReply, error)
	CreateArticle(ctx context.Context, in *Article, opts ...grpc.CallOption) (*CreateArticleReply, error)
	GetArticle(ctx context.Context, in *GetArticleRequest, opts ...grpc.CallOption) (*GetArticleReply, error)
	ListArticle(ctx context.Context, in *ListArticleRequest, opts ...grpc.CallOption) (*ListArticleReply, error)
	UpdateArticle(ctx context.Context, in *UpdateArticleRequest, opts ...grpc.CallOption) (*UpdateArticleReply, error)
	DeleteArticle(ctx context.Context, in *DeleteArticleRequest, opts ...grpc.CallOption) (*DeleteArticleReply, error)
}

ApigwClient is the client API for Apigw 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 NewApigwClient

func NewApigwClient(cc grpc.ClientConnInterface) ApigwClient

type ApigwHTTPClient

type ApigwHTTPClient interface {
	CreateArticle(ctx context.Context, req *Article, opts ...http.CallOption) (rsp *CreateArticleReply, err error)
	DeleteArticle(ctx context.Context, req *DeleteArticleRequest, opts ...http.CallOption) (rsp *DeleteArticleReply, err error)
	GetArticle(ctx context.Context, req *GetArticleRequest, opts ...http.CallOption) (rsp *GetArticleReply, err error)
	ListArticle(ctx context.Context, req *ListArticleRequest, opts ...http.CallOption) (rsp *ListArticleReply, err error)
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *ReturnTokenReply, err error)
	Register(ctx context.Context, req *RegisterRequest, opts ...http.CallOption) (rsp *ReturnTokenReply, err error)
	UpdateArticle(ctx context.Context, req *UpdateArticleRequest, opts ...http.CallOption) (rsp *UpdateArticleReply, err error)
}

func NewApigwHTTPClient

func NewApigwHTTPClient(client *http.Client) ApigwHTTPClient

type ApigwHTTPClientImpl

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

func (*ApigwHTTPClientImpl) CreateArticle

func (c *ApigwHTTPClientImpl) CreateArticle(ctx context.Context, in *Article, opts ...http.CallOption) (*CreateArticleReply, error)

func (*ApigwHTTPClientImpl) DeleteArticle

func (*ApigwHTTPClientImpl) GetArticle

func (*ApigwHTTPClientImpl) ListArticle

func (*ApigwHTTPClientImpl) Login

func (*ApigwHTTPClientImpl) Register

func (*ApigwHTTPClientImpl) UpdateArticle

type ApigwServer

ApigwServer is the server API for Apigw service. All implementations must embed UnimplementedApigwServer for forward compatibility

type Article

type Article struct {
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title      string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content    string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	CreateTime int64  `protobuf:"varint,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Article) Descriptor deprecated

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

Deprecated: Use Article.ProtoReflect.Descriptor instead.

func (*Article) GetContent

func (x *Article) GetContent() string

func (*Article) GetCreateTime

func (x *Article) GetCreateTime() int64

func (*Article) GetId

func (x *Article) GetId() int64

func (*Article) GetTitle

func (x *Article) GetTitle() string

func (*Article) ProtoMessage

func (*Article) ProtoMessage()

func (*Article) ProtoReflect

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

func (*Article) Reset

func (x *Article) Reset()

func (*Article) String

func (x *Article) String() string

type CreateArticleReply

type CreateArticleReply struct {
	Aid int64 `protobuf:"varint,1,opt,name=aid,proto3" json:"aid,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateArticleReply) Descriptor deprecated

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

Deprecated: Use CreateArticleReply.ProtoReflect.Descriptor instead.

func (*CreateArticleReply) GetAid

func (x *CreateArticleReply) GetAid() int64

func (*CreateArticleReply) ProtoMessage

func (*CreateArticleReply) ProtoMessage()

func (*CreateArticleReply) ProtoReflect

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

func (*CreateArticleReply) Reset

func (x *CreateArticleReply) Reset()

func (*CreateArticleReply) String

func (x *CreateArticleReply) String() string

type DeleteArticleReply

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

func (*DeleteArticleReply) Descriptor deprecated

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

Deprecated: Use DeleteArticleReply.ProtoReflect.Descriptor instead.

func (*DeleteArticleReply) ProtoMessage

func (*DeleteArticleReply) ProtoMessage()

func (*DeleteArticleReply) ProtoReflect

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

func (*DeleteArticleReply) Reset

func (x *DeleteArticleReply) Reset()

func (*DeleteArticleReply) String

func (x *DeleteArticleReply) String() string

type DeleteArticleRequest

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

func (*DeleteArticleRequest) Descriptor deprecated

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

Deprecated: Use DeleteArticleRequest.ProtoReflect.Descriptor instead.

func (*DeleteArticleRequest) GetId

func (x *DeleteArticleRequest) GetId() int64

func (*DeleteArticleRequest) ProtoMessage

func (*DeleteArticleRequest) ProtoMessage()

func (*DeleteArticleRequest) ProtoReflect

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

func (*DeleteArticleRequest) Reset

func (x *DeleteArticleRequest) Reset()

func (*DeleteArticleRequest) String

func (x *DeleteArticleRequest) String() string

type GetArticleReply

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

func (*GetArticleReply) Descriptor deprecated

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

Deprecated: Use GetArticleReply.ProtoReflect.Descriptor instead.

func (*GetArticleReply) GetArticle

func (x *GetArticleReply) GetArticle() *Article

func (*GetArticleReply) ProtoMessage

func (*GetArticleReply) ProtoMessage()

func (*GetArticleReply) ProtoReflect

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

func (*GetArticleReply) Reset

func (x *GetArticleReply) Reset()

func (*GetArticleReply) String

func (x *GetArticleReply) String() string

type GetArticleRequest

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

func (*GetArticleRequest) Descriptor deprecated

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

Deprecated: Use GetArticleRequest.ProtoReflect.Descriptor instead.

func (*GetArticleRequest) GetId

func (x *GetArticleRequest) GetId() int64

func (*GetArticleRequest) ProtoMessage

func (*GetArticleRequest) ProtoMessage()

func (*GetArticleRequest) ProtoReflect

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

func (*GetArticleRequest) Reset

func (x *GetArticleRequest) Reset()

func (*GetArticleRequest) String

func (x *GetArticleRequest) String() string

type ListArticleReply

type ListArticleReply struct {
	Results []*Article `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*ListArticleReply) Descriptor deprecated

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

Deprecated: Use ListArticleReply.ProtoReflect.Descriptor instead.

func (*ListArticleReply) GetResults

func (x *ListArticleReply) GetResults() []*Article

func (*ListArticleReply) ProtoMessage

func (*ListArticleReply) ProtoMessage()

func (*ListArticleReply) ProtoReflect

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

func (*ListArticleReply) Reset

func (x *ListArticleReply) Reset()

func (*ListArticleReply) String

func (x *ListArticleReply) String() string

type ListArticleRequest

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

func (*ListArticleRequest) Descriptor deprecated

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

Deprecated: Use ListArticleRequest.ProtoReflect.Descriptor instead.

func (*ListArticleRequest) ProtoMessage

func (*ListArticleRequest) ProtoMessage()

func (*ListArticleRequest) ProtoReflect

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

func (*ListArticleRequest) Reset

func (x *ListArticleRequest) Reset()

func (*ListArticleRequest) String

func (x *ListArticleRequest) String() string

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type RegisterRequest

type RegisterRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Avatar   string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAvatar

func (x *RegisterRequest) GetAvatar() string

func (*RegisterRequest) GetEmail

func (x *RegisterRequest) GetEmail() string

func (*RegisterRequest) GetName

func (x *RegisterRequest) GetName() string

func (*RegisterRequest) GetPassword

func (x *RegisterRequest) GetPassword() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type ReturnTokenReply

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

func (*ReturnTokenReply) Descriptor deprecated

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

Deprecated: Use ReturnTokenReply.ProtoReflect.Descriptor instead.

func (*ReturnTokenReply) GetToken

func (x *ReturnTokenReply) GetToken() string

func (*ReturnTokenReply) ProtoMessage

func (*ReturnTokenReply) ProtoMessage()

func (*ReturnTokenReply) ProtoReflect

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

func (*ReturnTokenReply) Reset

func (x *ReturnTokenReply) Reset()

func (*ReturnTokenReply) String

func (x *ReturnTokenReply) String() string

type UnimplementedApigwServer

type UnimplementedApigwServer struct {
}

UnimplementedApigwServer must be embedded to have forward compatible implementations.

func (UnimplementedApigwServer) CreateArticle

func (UnimplementedApigwServer) DeleteArticle

func (UnimplementedApigwServer) GetArticle

func (UnimplementedApigwServer) ListArticle

func (UnimplementedApigwServer) Login

func (UnimplementedApigwServer) Register

func (UnimplementedApigwServer) UpdateArticle

type UnsafeApigwServer

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

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

type UpdateArticleReply

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

func (*UpdateArticleReply) Descriptor deprecated

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

Deprecated: Use UpdateArticleReply.ProtoReflect.Descriptor instead.

func (*UpdateArticleReply) GetArticle

func (x *UpdateArticleReply) GetArticle() *Article

func (*UpdateArticleReply) ProtoMessage

func (*UpdateArticleReply) ProtoMessage()

func (*UpdateArticleReply) ProtoReflect

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

func (*UpdateArticleReply) Reset

func (x *UpdateArticleReply) Reset()

func (*UpdateArticleReply) String

func (x *UpdateArticleReply) String() string

type UpdateArticleRequest

type UpdateArticleRequest struct {
	Id      int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title   string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateArticleRequest) Descriptor deprecated

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

Deprecated: Use UpdateArticleRequest.ProtoReflect.Descriptor instead.

func (*UpdateArticleRequest) GetContent

func (x *UpdateArticleRequest) GetContent() string

func (*UpdateArticleRequest) GetId

func (x *UpdateArticleRequest) GetId() int64

func (*UpdateArticleRequest) GetTitle

func (x *UpdateArticleRequest) GetTitle() string

func (*UpdateArticleRequest) ProtoMessage

func (*UpdateArticleRequest) ProtoMessage()

func (*UpdateArticleRequest) ProtoReflect

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

func (*UpdateArticleRequest) Reset

func (x *UpdateArticleRequest) Reset()

func (*UpdateArticleRequest) String

func (x *UpdateArticleRequest) String() string

Jump to

Keyboard shortcuts

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