usersservicepb

package
v0.0.0-...-1c92e5d Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package usersservicepb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	OrderBy_name = map[int32]string{
		0: "ORDER_BY_NONE",
		1: "ORDER_BY_NAME",
		2: "ORDER_BY_CREATE_TIME",
	}
	OrderBy_value = map[string]int32{
		"ORDER_BY_NONE":        0,
		"ORDER_BY_NAME":        1,
		"ORDER_BY_CREATE_TIME": 2,
	}
)

Enum value maps for OrderBy.

View Source
var File_uwlabs_users_service_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterUserReaderServiceHandler

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

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

func RegisterUserReaderServiceHandlerClient

func RegisterUserReaderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserReaderServiceClient) error

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

func RegisterUserReaderServiceHandlerFromEndpoint

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

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

func RegisterUserReaderServiceHandlerServer

func RegisterUserReaderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserReaderServiceServer) error

RegisterUserReaderServiceHandlerServer registers the http handlers for service UserReaderService to "mux". UnaryRPC :call UserReaderServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterUserReaderServiceServer

func RegisterUserReaderServiceServer(s *grpc.Server, srv UserReaderServiceServer)

func RegisterUserWriterServiceHandler

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

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

func RegisterUserWriterServiceHandlerClient

func RegisterUserWriterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserWriterServiceClient) error

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

func RegisterUserWriterServiceHandlerFromEndpoint

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

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

func RegisterUserWriterServiceHandlerServer

func RegisterUserWriterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserWriterServiceServer) error

RegisterUserWriterServiceHandlerServer registers the http handlers for service UserWriterService to "mux". UnaryRPC :call UserWriterServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterUserWriterServiceServer

func RegisterUserWriterServiceServer(s *grpc.Server, srv UserWriterServiceServer)

Types

type CreateUserRequest

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

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetName

func (x *CreateUserRequest) GetName() 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 CreateUserResponse

type CreateUserResponse struct {
	User *v1.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetUser

func (x *CreateUserResponse) GetUser() *v1.User

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type GetUserRequest

type GetUserRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetUserId

func (x *GetUserRequest) GetUserId() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User *v1.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *v1.User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type ListUsersRequest

type ListUsersRequest struct {
	Names     []string   `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	SortOrder *SortOrder `protobuf:"bytes,4,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsersRequest) Descriptor deprecated

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

Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.

func (*ListUsersRequest) GetNames

func (x *ListUsersRequest) GetNames() []string

func (*ListUsersRequest) GetSortOrder

func (x *ListUsersRequest) GetSortOrder() *SortOrder

func (*ListUsersRequest) ProtoMessage

func (*ListUsersRequest) ProtoMessage()

func (*ListUsersRequest) ProtoReflect

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

func (*ListUsersRequest) Reset

func (x *ListUsersRequest) Reset()

func (*ListUsersRequest) String

func (x *ListUsersRequest) String() string

type ListUsersResponse

type ListUsersResponse struct {
	Users []*v1.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsersResponse) Descriptor deprecated

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

Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.

func (*ListUsersResponse) GetUsers

func (x *ListUsersResponse) GetUsers() []*v1.User

func (*ListUsersResponse) ProtoMessage

func (*ListUsersResponse) ProtoMessage()

func (*ListUsersResponse) ProtoReflect

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

func (*ListUsersResponse) Reset

func (x *ListUsersResponse) Reset()

func (*ListUsersResponse) String

func (x *ListUsersResponse) String() string

type OrderBy

type OrderBy int32
const (
	OrderBy_ORDER_BY_NONE        OrderBy = 0
	OrderBy_ORDER_BY_NAME        OrderBy = 1
	OrderBy_ORDER_BY_CREATE_TIME OrderBy = 2
)

func (OrderBy) Descriptor

func (OrderBy) Descriptor() protoreflect.EnumDescriptor

func (OrderBy) Enum

func (x OrderBy) Enum() *OrderBy

func (OrderBy) EnumDescriptor deprecated

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

Deprecated: Use OrderBy.Descriptor instead.

func (OrderBy) Number

func (x OrderBy) Number() protoreflect.EnumNumber

func (OrderBy) String

func (x OrderBy) String() string

func (OrderBy) Type

func (OrderBy) Type() protoreflect.EnumType

type SortOrder

type SortOrder struct {
	By         OrderBy `protobuf:"varint,1,opt,name=by,proto3,enum=uwlabs.users.service.v1.OrderBy" json:"by,omitempty"`
	Descending bool    `protobuf:"varint,2,opt,name=descending,proto3" json:"descending,omitempty"`
	// contains filtered or unexported fields
}

func (*SortOrder) Descriptor deprecated

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

Deprecated: Use SortOrder.ProtoReflect.Descriptor instead.

func (*SortOrder) GetBy

func (x *SortOrder) GetBy() OrderBy

func (*SortOrder) GetDescending

func (x *SortOrder) GetDescending() bool

func (*SortOrder) ProtoMessage

func (*SortOrder) ProtoMessage()

func (*SortOrder) ProtoReflect

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

func (*SortOrder) Reset

func (x *SortOrder) Reset()

func (*SortOrder) String

func (x *SortOrder) String() string

type UnimplementedUserReaderServiceServer

type UnimplementedUserReaderServiceServer struct {
}

UnimplementedUserReaderServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserReaderServiceServer) GetUser

func (*UnimplementedUserReaderServiceServer) ListUsers

type UnimplementedUserWriterServiceServer

type UnimplementedUserWriterServiceServer struct {
}

UnimplementedUserWriterServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserWriterServiceServer) CreateUser

type UserReaderServiceClient

type UserReaderServiceClient interface {
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
}

UserReaderServiceClient is the client API for UserReaderService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type UserReaderServiceServer

type UserReaderServiceServer interface {
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
}

UserReaderServiceServer is the server API for UserReaderService service.

type UserWriterServiceClient

type UserWriterServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
}

UserWriterServiceClient is the client API for UserWriterService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type UserWriterServiceServer

type UserWriterServiceServer interface {
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
}

UserWriterServiceServer is the server API for UserWriterService service.

Jump to

Keyboard shortcuts

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