v1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PetType_name = map[int32]string{
		0: "DOG",
		1: "CAT",
	}
	PetType_value = map[string]int32{
		"DOG": 0,
		"CAT": 1,
	}
)

Enum value maps for PetType.

View Source
var File_example_v1_greeter_proto protoreflect.FileDescriptor

Functions

func RegisterGreeterRouter

func RegisterGreeterRouter(r *gin.Engine)

func WooAuthMiddleware added in v0.0.2

func WooAuthMiddleware(c *gin.Context)

Types

type CreateUserReply

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

Login reply must include token field.

func GreeterCreateUserBusinessHandler0

func GreeterCreateUserBusinessHandler0(req *CreateUserRequest, c *gin.Context) (CreateUserReply, error)

func (*CreateUserReply) Descriptor deprecated

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

Deprecated: Use CreateUserReply.ProtoReflect.Descriptor instead.

func (*CreateUserReply) GetToken

func (x *CreateUserReply) GetToken() string

func (*CreateUserReply) ProtoMessage

func (*CreateUserReply) ProtoMessage()

func (*CreateUserReply) ProtoReflect

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

func (*CreateUserReply) Reset

func (x *CreateUserReply) Reset()

func (*CreateUserReply) String

func (x *CreateUserReply) String() string

type CreateUserRequest

type CreateUserRequest 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
}

Login request must include username and password field.

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetUsername

func (x *CreateUserRequest) GetUsername() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type CustomClaims

type CustomClaims struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

security_definitions one-to-one

func (*CustomClaims) Descriptor deprecated

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

Deprecated: Use CustomClaims.ProtoReflect.Descriptor instead.

func (*CustomClaims) GetId

func (x *CustomClaims) GetId() int64

func (*CustomClaims) GetUsername

func (x *CustomClaims) GetUsername() string

func (*CustomClaims) ProtoMessage

func (*CustomClaims) ProtoMessage()

func (*CustomClaims) ProtoReflect

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

func (*CustomClaims) Reset

func (x *CustomClaims) Reset()

func (*CustomClaims) String

func (x *CustomClaims) String() string

type DetailsMixin

type DetailsMixin struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Age  int64  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DetailsMixin) Descriptor deprecated

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

Deprecated: Use DetailsMixin.ProtoReflect.Descriptor instead.

func (*DetailsMixin) GetAge

func (x *DetailsMixin) GetAge() int64

func (*DetailsMixin) GetId

func (x *DetailsMixin) GetId() int64

func (*DetailsMixin) GetName

func (x *DetailsMixin) GetName() string

func (*DetailsMixin) ProtoMessage

func (*DetailsMixin) ProtoMessage()

func (*DetailsMixin) ProtoReflect

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

func (*DetailsMixin) Reset

func (x *DetailsMixin) Reset()

func (*DetailsMixin) String

func (x *DetailsMixin) String() string

type HelloReply

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

The response message containing the greetings

func GreeterSayHelloBusinessHandler0

func GreeterSayHelloBusinessHandler0(req *HelloRequest, c *gin.Context) (HelloReply, error)

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

type HelloRequest struct {
	Name   int32  `protobuf:"varint,1,opt,name=name,proto3" json:"name,omitempty"`
	Nice   string `protobuf:"bytes,2,opt,name=nice,proto3" json:"nice,omitempty"`
	Uid    int64  `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
	Authed bool   `protobuf:"varint,4,opt,name=authed,proto3" json:"authed,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetAuthed

func (x *HelloRequest) GetAuthed() bool

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() int32

func (*HelloRequest) GetNice

func (x *HelloRequest) GetNice() string

func (*HelloRequest) GetUid

func (x *HelloRequest) GetUid() int64

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type LoginReply

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

func GreeterLoginBusinessHandler0

func GreeterLoginBusinessHandler0(req *LoginRequest, c *gin.Context) (LoginReply, error)

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetToken

func (x *LoginReply) GetToken() string

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) 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 MyCustomClaims

type MyCustomClaims struct {
	Id       int    `json:"id"`
	Username string `json:"username"`
	jwt.StandardClaims
}

type Pet

type Pet struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //  PetType ptype = 3;
	// contains filtered or unexported fields
}

func (*Pet) Descriptor deprecated

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

Deprecated: Use Pet.ProtoReflect.Descriptor instead.

func (*Pet) GetId

func (x *Pet) GetId() int64

func (*Pet) GetName

func (x *Pet) GetName() string

func (*Pet) ProtoMessage

func (*Pet) ProtoMessage()

func (*Pet) ProtoReflect

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

func (*Pet) Reset

func (x *Pet) Reset()

func (*Pet) String

func (x *Pet) String() string

type PetType

type PetType int32
const (
	PetType_DOG PetType = 0
	PetType_CAT PetType = 1
)

func (PetType) Descriptor

func (PetType) Descriptor() protoreflect.EnumDescriptor

func (PetType) Enum

func (x PetType) Enum() *PetType

func (PetType) EnumDescriptor deprecated

func (PetType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PetType.Descriptor instead.

func (PetType) Number

func (x PetType) Number() protoreflect.EnumNumber

func (PetType) String

func (x PetType) String() string

func (PetType) Type

func (PetType) Type() protoreflect.EnumType

type TimeMixin

type TimeMixin struct {
	Id        int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeMixin) Descriptor deprecated

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

Deprecated: Use TimeMixin.ProtoReflect.Descriptor instead.

func (*TimeMixin) GetCreatedAt

func (x *TimeMixin) GetCreatedAt() *timestamppb.Timestamp

func (*TimeMixin) GetId

func (x *TimeMixin) GetId() int64

func (*TimeMixin) GetUpdatedAt

func (x *TimeMixin) GetUpdatedAt() *timestamppb.Timestamp

func (*TimeMixin) ProtoMessage

func (*TimeMixin) ProtoMessage()

func (*TimeMixin) ProtoReflect

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

func (*TimeMixin) Reset

func (x *TimeMixin) Reset()

func (*TimeMixin) String

func (x *TimeMixin) String() string

type UpdateUserReply

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

The response message containing the greetings

func GreeterUpdateUserBusinessHandler0

func GreeterUpdateUserBusinessHandler0(req *UpdateUserRequest, c *gin.Context) (UpdateUserReply, error)

func (*UpdateUserReply) Descriptor deprecated

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

Deprecated: Use UpdateUserReply.ProtoReflect.Descriptor instead.

func (*UpdateUserReply) GetMessage

func (x *UpdateUserReply) GetMessage() string

func (*UpdateUserReply) GetUsername

func (x *UpdateUserReply) GetUsername() string

func (*UpdateUserReply) ProtoMessage

func (*UpdateUserReply) ProtoMessage()

func (*UpdateUserReply) ProtoReflect

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

func (*UpdateUserReply) Reset

func (x *UpdateUserReply) Reset()

func (*UpdateUserReply) String

func (x *UpdateUserReply) String() string

type UpdateUserRequest

type UpdateUserRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Phone    string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetEmail

func (x *UpdateUserRequest) GetEmail() string

func (*UpdateUserRequest) GetPhone

func (x *UpdateUserRequest) GetPhone() string

func (*UpdateUserRequest) GetUsername

func (x *UpdateUserRequest) GetUsername() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type User

type User struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Age      int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	// contains filtered or unexported fields
}

The ent

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAge

func (x *User) GetAge() int32

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetNickname

func (x *User) GetNickname() string

func (*User) GetUsername

func (x *User) GetUsername() 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

type UserReply

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

The response message containing the greetings

func GreeterDeleteUserBusinessHandler0

func GreeterDeleteUserBusinessHandler0(req *UserRequest, c *gin.Context) (UserReply, error)

func (*UserReply) Descriptor deprecated

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

Deprecated: Use UserReply.ProtoReflect.Descriptor instead.

func (*UserReply) GetMessage

func (x *UserReply) GetMessage() string

func (*UserReply) ProtoMessage

func (*UserReply) ProtoMessage()

func (*UserReply) ProtoReflect

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

func (*UserReply) Reset

func (x *UserReply) Reset()

func (*UserReply) String

func (x *UserReply) String() string

type UserReplys

type UserReplys struct {
	UserList []*UserReply `protobuf:"bytes,1,rep,name=userList,proto3" json:"userList,omitempty"`
	// The maximum number of books to return. The service may return fewer than
	// this value.
	// If unspecified, at most 50 books will be returned.
	// The maximum value is 1000; values above 1000 will be coerced to 1000.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `ListBooks` call.
	// Provide this to retrieve the subsequent page.
	//
	// When paginating, all other parameters provided to `ListBooks` must match
	// the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

func GreeterListUsersBusinessHandler0

func GreeterListUsersBusinessHandler0(req *UserRequest, c *gin.Context) (UserReplys, error)

func (*UserReplys) Descriptor deprecated

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

Deprecated: Use UserReplys.ProtoReflect.Descriptor instead.

func (*UserReplys) GetPageSize

func (x *UserReplys) GetPageSize() int32

func (*UserReplys) GetPageToken

func (x *UserReplys) GetPageToken() string

func (*UserReplys) GetUserList

func (x *UserReplys) GetUserList() []*UserReply

func (*UserReplys) ProtoMessage

func (*UserReplys) ProtoMessage()

func (*UserReplys) ProtoReflect

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

func (*UserReplys) Reset

func (x *UserReplys) Reset()

func (*UserReplys) String

func (x *UserReplys) String() string

type UserRequest

type UserRequest struct {
	Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*UserRequest) Descriptor deprecated

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

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetEmail

func (x *UserRequest) GetEmail() string

func (*UserRequest) GetPhone

func (x *UserRequest) GetPhone() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

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

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) String

func (x *UserRequest) String() string

Jump to

Keyboard shortcuts

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