proto

package
v0.0.0-...-6784bb4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_user_apiv1_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceHandler

func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthServiceHandlerClient

func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error

RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors.

func RegisterAuthServiceHandlerFromEndpoint

func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthServiceHandlerServer

func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error

RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthResponse

type AuthResponse struct {
	Id               string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username         string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Gender           int32  `protobuf:"varint,3,opt,name=gender,proto3" json:"gender,omitempty"`
	Email            string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber      string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	Role             int32  `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"`
	ThumbnailUrl     string `protobuf:"bytes,7,opt,name=thumbnail_url,json=thumbnailUrl,proto3" json:"thumbnail_url,omitempty"`
	SelfIntroduction string `protobuf:"bytes,8,opt,name=self_introduction,json=selfIntroduction,proto3" json:"self_introduction,omitempty"`
	LastName         string `protobuf:"bytes,9,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	FirstName        string `protobuf:"bytes,10,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastNameKana     string `protobuf:"bytes,11,opt,name=last_name_kana,json=lastNameKana,proto3" json:"last_name_kana,omitempty"`
	FirstNameKana    string `protobuf:"bytes,12,opt,name=first_name_kana,json=firstNameKana,proto3" json:"first_name_kana,omitempty"`
	PostalCode       string `protobuf:"bytes,13,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
	Prefecture       string `protobuf:"bytes,14,opt,name=prefecture,proto3" json:"prefecture,omitempty"`
	City             string `protobuf:"bytes,15,opt,name=city,proto3" json:"city,omitempty"`
	AddressLine1     string `protobuf:"bytes,16,opt,name=address_line1,json=addressLine1,proto3" json:"address_line1,omitempty"`
	AddressLine2     string `protobuf:"bytes,17,opt,name=address_line2,json=addressLine2,proto3" json:"address_line2,omitempty"`
	CreatedAt        string `protobuf:"bytes,18,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt        string `protobuf:"bytes,19,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthResponse) Descriptor deprecated

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

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetAddressLine1

func (x *AuthResponse) GetAddressLine1() string

func (*AuthResponse) GetAddressLine2

func (x *AuthResponse) GetAddressLine2() string

func (*AuthResponse) GetCity

func (x *AuthResponse) GetCity() string

func (*AuthResponse) GetCreatedAt

func (x *AuthResponse) GetCreatedAt() string

func (*AuthResponse) GetEmail

func (x *AuthResponse) GetEmail() string

func (*AuthResponse) GetFirstName

func (x *AuthResponse) GetFirstName() string

func (*AuthResponse) GetFirstNameKana

func (x *AuthResponse) GetFirstNameKana() string

func (*AuthResponse) GetGender

func (x *AuthResponse) GetGender() int32

func (*AuthResponse) GetId

func (x *AuthResponse) GetId() string

func (*AuthResponse) GetLastName

func (x *AuthResponse) GetLastName() string

func (*AuthResponse) GetLastNameKana

func (x *AuthResponse) GetLastNameKana() string

func (*AuthResponse) GetPhoneNumber

func (x *AuthResponse) GetPhoneNumber() string

func (*AuthResponse) GetPostalCode

func (x *AuthResponse) GetPostalCode() string

func (*AuthResponse) GetPrefecture

func (x *AuthResponse) GetPrefecture() string

func (*AuthResponse) GetRole

func (x *AuthResponse) GetRole() int32

func (*AuthResponse) GetSelfIntroduction

func (x *AuthResponse) GetSelfIntroduction() string

func (*AuthResponse) GetThumbnailUrl

func (x *AuthResponse) GetThumbnailUrl() string

func (*AuthResponse) GetUpdatedAt

func (x *AuthResponse) GetUpdatedAt() string

func (*AuthResponse) GetUsername

func (x *AuthResponse) GetUsername() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect

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

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type AuthServiceClient

type AuthServiceClient interface {
	GetAuth(ctx context.Context, in *EmptyUser, opts ...grpc.CallOption) (*AuthResponse, error)
	CreateAuth(ctx context.Context, in *CreateAuthRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	UpdateAuthEmail(ctx context.Context, in *UpdateAuthEmailRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	UpdateAuthPassword(ctx context.Context, in *UpdateAuthPasswordRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	UpdateAuthProfile(ctx context.Context, in *UpdateAuthProfileRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	UpdateAuthAddress(ctx context.Context, in *UpdateAuthAddressRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}

AuthServiceClient is the client API for AuthService 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.

type AuthServiceServer

type AuthServiceServer interface {
	GetAuth(context.Context, *EmptyUser) (*AuthResponse, error)
	CreateAuth(context.Context, *CreateAuthRequest) (*AuthResponse, error)
	UpdateAuthEmail(context.Context, *UpdateAuthEmailRequest) (*AuthResponse, error)
	UpdateAuthPassword(context.Context, *UpdateAuthPasswordRequest) (*AuthResponse, error)
	UpdateAuthProfile(context.Context, *UpdateAuthProfileRequest) (*AuthResponse, error)
	UpdateAuthAddress(context.Context, *UpdateAuthAddressRequest) (*AuthResponse, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type CreateAuthRequest

type CreateAuthRequest struct {
	Username             string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email                string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password             string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirmation string `protobuf:"bytes,4,opt,name=password_confirmation,json=passwordConfirmation,proto3" json:"password_confirmation,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAuthRequest) Descriptor deprecated

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

Deprecated: Use CreateAuthRequest.ProtoReflect.Descriptor instead.

func (*CreateAuthRequest) GetEmail

func (x *CreateAuthRequest) GetEmail() string

func (*CreateAuthRequest) GetPassword

func (x *CreateAuthRequest) GetPassword() string

func (*CreateAuthRequest) GetPasswordConfirmation

func (x *CreateAuthRequest) GetPasswordConfirmation() string

func (*CreateAuthRequest) GetUsername

func (x *CreateAuthRequest) GetUsername() string

func (*CreateAuthRequest) ProtoMessage

func (*CreateAuthRequest) ProtoMessage()

func (*CreateAuthRequest) ProtoReflect

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

func (*CreateAuthRequest) Reset

func (x *CreateAuthRequest) Reset()

func (*CreateAuthRequest) String

func (x *CreateAuthRequest) String() string

type EmptyUser

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

func (*EmptyUser) Descriptor deprecated

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

Deprecated: Use EmptyUser.ProtoReflect.Descriptor instead.

func (*EmptyUser) ProtoMessage

func (*EmptyUser) ProtoMessage()

func (*EmptyUser) ProtoReflect

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

func (*EmptyUser) Reset

func (x *EmptyUser) Reset()

func (*EmptyUser) String

func (x *EmptyUser) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) CreateAuth

func (UnimplementedAuthServiceServer) GetAuth

func (UnimplementedAuthServiceServer) UpdateAuthAddress

func (UnimplementedAuthServiceServer) UpdateAuthEmail

func (UnimplementedAuthServiceServer) UpdateAuthPassword

func (UnimplementedAuthServiceServer) UpdateAuthProfile

type UnsafeAuthServiceServer

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

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

type UpdateAuthAddressRequest

type UpdateAuthAddressRequest struct {
	LastName      string `protobuf:"bytes,1,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	FirstName     string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastNameKana  string `protobuf:"bytes,3,opt,name=last_name_kana,json=lastNameKana,proto3" json:"last_name_kana,omitempty"`
	FirstNameKana string `protobuf:"bytes,4,opt,name=first_name_kana,json=firstNameKana,proto3" json:"first_name_kana,omitempty"`
	PhoneNumber   string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	PostalCode    string `protobuf:"bytes,6,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
	Prefecture    string `protobuf:"bytes,7,opt,name=prefecture,proto3" json:"prefecture,omitempty"`
	City          string `protobuf:"bytes,8,opt,name=city,proto3" json:"city,omitempty"`
	AddressLine1  string `protobuf:"bytes,9,opt,name=address_line1,json=addressLine1,proto3" json:"address_line1,omitempty"`
	AddressLine2  string `protobuf:"bytes,10,opt,name=address_line2,json=addressLine2,proto3" json:"address_line2,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAuthAddressRequest) Descriptor deprecated

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

Deprecated: Use UpdateAuthAddressRequest.ProtoReflect.Descriptor instead.

func (*UpdateAuthAddressRequest) GetAddressLine1

func (x *UpdateAuthAddressRequest) GetAddressLine1() string

func (*UpdateAuthAddressRequest) GetAddressLine2

func (x *UpdateAuthAddressRequest) GetAddressLine2() string

func (*UpdateAuthAddressRequest) GetCity

func (x *UpdateAuthAddressRequest) GetCity() string

func (*UpdateAuthAddressRequest) GetFirstName

func (x *UpdateAuthAddressRequest) GetFirstName() string

func (*UpdateAuthAddressRequest) GetFirstNameKana

func (x *UpdateAuthAddressRequest) GetFirstNameKana() string

func (*UpdateAuthAddressRequest) GetLastName

func (x *UpdateAuthAddressRequest) GetLastName() string

func (*UpdateAuthAddressRequest) GetLastNameKana

func (x *UpdateAuthAddressRequest) GetLastNameKana() string

func (*UpdateAuthAddressRequest) GetPhoneNumber

func (x *UpdateAuthAddressRequest) GetPhoneNumber() string

func (*UpdateAuthAddressRequest) GetPostalCode

func (x *UpdateAuthAddressRequest) GetPostalCode() string

func (*UpdateAuthAddressRequest) GetPrefecture

func (x *UpdateAuthAddressRequest) GetPrefecture() string

func (*UpdateAuthAddressRequest) ProtoMessage

func (*UpdateAuthAddressRequest) ProtoMessage()

func (*UpdateAuthAddressRequest) ProtoReflect

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

func (*UpdateAuthAddressRequest) Reset

func (x *UpdateAuthAddressRequest) Reset()

func (*UpdateAuthAddressRequest) String

func (x *UpdateAuthAddressRequest) String() string

type UpdateAuthEmailRequest

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

func (*UpdateAuthEmailRequest) Descriptor deprecated

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

Deprecated: Use UpdateAuthEmailRequest.ProtoReflect.Descriptor instead.

func (*UpdateAuthEmailRequest) GetEmail

func (x *UpdateAuthEmailRequest) GetEmail() string

func (*UpdateAuthEmailRequest) ProtoMessage

func (*UpdateAuthEmailRequest) ProtoMessage()

func (*UpdateAuthEmailRequest) ProtoReflect

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

func (*UpdateAuthEmailRequest) Reset

func (x *UpdateAuthEmailRequest) Reset()

func (*UpdateAuthEmailRequest) String

func (x *UpdateAuthEmailRequest) String() string

type UpdateAuthPasswordRequest

type UpdateAuthPasswordRequest struct {
	Password             string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirmation string `protobuf:"bytes,2,opt,name=password_confirmation,json=passwordConfirmation,proto3" json:"password_confirmation,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAuthPasswordRequest) Descriptor deprecated

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

Deprecated: Use UpdateAuthPasswordRequest.ProtoReflect.Descriptor instead.

func (*UpdateAuthPasswordRequest) GetPassword

func (x *UpdateAuthPasswordRequest) GetPassword() string

func (*UpdateAuthPasswordRequest) GetPasswordConfirmation

func (x *UpdateAuthPasswordRequest) GetPasswordConfirmation() string

func (*UpdateAuthPasswordRequest) ProtoMessage

func (*UpdateAuthPasswordRequest) ProtoMessage()

func (*UpdateAuthPasswordRequest) ProtoReflect

func (*UpdateAuthPasswordRequest) Reset

func (x *UpdateAuthPasswordRequest) Reset()

func (*UpdateAuthPasswordRequest) String

func (x *UpdateAuthPasswordRequest) String() string

type UpdateAuthProfileRequest

type UpdateAuthProfileRequest struct {
	Username         string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Gender           int32  `protobuf:"varint,2,opt,name=gender,proto3" json:"gender,omitempty"`
	Thumbnail        string `protobuf:"bytes,3,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"`
	SelfIntroduction string `protobuf:"bytes,4,opt,name=self_introduction,json=selfIntroduction,proto3" json:"self_introduction,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAuthProfileRequest) Descriptor deprecated

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

Deprecated: Use UpdateAuthProfileRequest.ProtoReflect.Descriptor instead.

func (*UpdateAuthProfileRequest) GetGender

func (x *UpdateAuthProfileRequest) GetGender() int32

func (*UpdateAuthProfileRequest) GetSelfIntroduction

func (x *UpdateAuthProfileRequest) GetSelfIntroduction() string

func (*UpdateAuthProfileRequest) GetThumbnail

func (x *UpdateAuthProfileRequest) GetThumbnail() string

func (*UpdateAuthProfileRequest) GetUsername

func (x *UpdateAuthProfileRequest) GetUsername() string

func (*UpdateAuthProfileRequest) ProtoMessage

func (*UpdateAuthProfileRequest) ProtoMessage()

func (*UpdateAuthProfileRequest) ProtoReflect

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

func (*UpdateAuthProfileRequest) Reset

func (x *UpdateAuthProfileRequest) Reset()

func (*UpdateAuthProfileRequest) String

func (x *UpdateAuthProfileRequest) String() string

Jump to

Keyboard shortcuts

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