grpc

package
v0.0.0-...-16561bc Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package grpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package grpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package grpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

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.

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)

func RegisterTweetServiceHandler

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

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

func RegisterTweetServiceHandlerClient

func RegisterTweetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TweetServiceClient) error

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

func RegisterTweetServiceHandlerFromEndpoint

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

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

func RegisterTweetServiceHandlerServer

func RegisterTweetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TweetServiceServer) error

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

func RegisterTweetServiceServer

func RegisterTweetServiceServer(s *grpc.Server, srv TweetServiceServer)

func RegisterUserServiceHandler

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

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

func RegisterUserServiceHandlerClient

func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error

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

func RegisterUserServiceHandlerFromEndpoint

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

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

func RegisterUserServiceHandlerServer

func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error

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

func RegisterUserServiceServer

func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
}

AuthServiceClient is the client API for AuthService service.

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

func NewAuthServiceClient

func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient

type AuthServiceServer

type AuthServiceServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
}

AuthServiceServer is the server API for AuthService service.

type CreateTweetRequest

type CreateTweetRequest struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateTweetRequest) Descriptor

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

func (*CreateTweetRequest) GetMessage

func (m *CreateTweetRequest) GetMessage() string

func (*CreateTweetRequest) ProtoMessage

func (*CreateTweetRequest) ProtoMessage()

func (*CreateTweetRequest) Reset

func (m *CreateTweetRequest) Reset()

func (*CreateTweetRequest) String

func (m *CreateTweetRequest) String() string

func (*CreateTweetRequest) Validate

func (m *CreateTweetRequest) Validate() error

Validate checks the field values on CreateTweetRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateTweetRequest) XXX_DiscardUnknown

func (m *CreateTweetRequest) XXX_DiscardUnknown()

func (*CreateTweetRequest) XXX_Marshal

func (m *CreateTweetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateTweetRequest) XXX_Merge

func (m *CreateTweetRequest) XXX_Merge(src proto.Message)

func (*CreateTweetRequest) XXX_Size

func (m *CreateTweetRequest) XXX_Size() int

func (*CreateTweetRequest) XXX_Unmarshal

func (m *CreateTweetRequest) XXX_Unmarshal(b []byte) error

type CreateTweetRequestValidationError

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

CreateTweetRequestValidationError is the validation error returned by CreateTweetRequest.Validate if the designated constraints aren't met.

func (CreateTweetRequestValidationError) Cause

Cause function returns cause value.

func (CreateTweetRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateTweetRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateTweetRequestValidationError) Field

Field function returns field value.

func (CreateTweetRequestValidationError) Key

Key function returns key value.

func (CreateTweetRequestValidationError) Reason

Reason function returns reason value.

type CreateTweetResponse

type CreateTweetResponse struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateTweetResponse) Descriptor

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

func (*CreateTweetResponse) GetId

func (m *CreateTweetResponse) GetId() uint64

func (*CreateTweetResponse) GetMessage

func (m *CreateTweetResponse) GetMessage() string

func (*CreateTweetResponse) ProtoMessage

func (*CreateTweetResponse) ProtoMessage()

func (*CreateTweetResponse) Reset

func (m *CreateTweetResponse) Reset()

func (*CreateTweetResponse) String

func (m *CreateTweetResponse) String() string

func (*CreateTweetResponse) Validate

func (m *CreateTweetResponse) Validate() error

Validate checks the field values on CreateTweetResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateTweetResponse) XXX_DiscardUnknown

func (m *CreateTweetResponse) XXX_DiscardUnknown()

func (*CreateTweetResponse) XXX_Marshal

func (m *CreateTweetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateTweetResponse) XXX_Merge

func (m *CreateTweetResponse) XXX_Merge(src proto.Message)

func (*CreateTweetResponse) XXX_Size

func (m *CreateTweetResponse) XXX_Size() int

func (*CreateTweetResponse) XXX_Unmarshal

func (m *CreateTweetResponse) XXX_Unmarshal(b []byte) error

type CreateTweetResponseValidationError

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

CreateTweetResponseValidationError is the validation error returned by CreateTweetResponse.Validate if the designated constraints aren't met.

func (CreateTweetResponseValidationError) Cause

Cause function returns cause value.

func (CreateTweetResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateTweetResponseValidationError) ErrorName

ErrorName returns error name.

func (CreateTweetResponseValidationError) Field

Field function returns field value.

func (CreateTweetResponseValidationError) Key

Key function returns key value.

func (CreateTweetResponseValidationError) Reason

Reason function returns reason value.

type ListTweetRequest

type ListTweetRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListTweetRequest) Descriptor

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

func (*ListTweetRequest) ProtoMessage

func (*ListTweetRequest) ProtoMessage()

func (*ListTweetRequest) Reset

func (m *ListTweetRequest) Reset()

func (*ListTweetRequest) String

func (m *ListTweetRequest) String() string

func (*ListTweetRequest) Validate

func (m *ListTweetRequest) Validate() error

Validate checks the field values on ListTweetRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ListTweetRequest) XXX_DiscardUnknown

func (m *ListTweetRequest) XXX_DiscardUnknown()

func (*ListTweetRequest) XXX_Marshal

func (m *ListTweetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTweetRequest) XXX_Merge

func (m *ListTweetRequest) XXX_Merge(src proto.Message)

func (*ListTweetRequest) XXX_Size

func (m *ListTweetRequest) XXX_Size() int

func (*ListTweetRequest) XXX_Unmarshal

func (m *ListTweetRequest) XXX_Unmarshal(b []byte) error

type ListTweetRequestValidationError

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

ListTweetRequestValidationError is the validation error returned by ListTweetRequest.Validate if the designated constraints aren't met.

func (ListTweetRequestValidationError) Cause

Cause function returns cause value.

func (ListTweetRequestValidationError) Error

Error satisfies the builtin error interface

func (ListTweetRequestValidationError) ErrorName

ErrorName returns error name.

func (ListTweetRequestValidationError) Field

Field function returns field value.

func (ListTweetRequestValidationError) Key

Key function returns key value.

func (ListTweetRequestValidationError) Reason

Reason function returns reason value.

type ListTweetResponse

type ListTweetResponse struct {
	Tweets               []*ListTweetResponse_Tweet `protobuf:"bytes,1,rep,name=tweets,proto3" json:"tweets,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*ListTweetResponse) Descriptor

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

func (*ListTweetResponse) GetTweets

func (m *ListTweetResponse) GetTweets() []*ListTweetResponse_Tweet

func (*ListTweetResponse) ProtoMessage

func (*ListTweetResponse) ProtoMessage()

func (*ListTweetResponse) Reset

func (m *ListTweetResponse) Reset()

func (*ListTweetResponse) String

func (m *ListTweetResponse) String() string

func (*ListTweetResponse) Validate

func (m *ListTweetResponse) Validate() error

Validate checks the field values on ListTweetResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ListTweetResponse) XXX_DiscardUnknown

func (m *ListTweetResponse) XXX_DiscardUnknown()

func (*ListTweetResponse) XXX_Marshal

func (m *ListTweetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTweetResponse) XXX_Merge

func (m *ListTweetResponse) XXX_Merge(src proto.Message)

func (*ListTweetResponse) XXX_Size

func (m *ListTweetResponse) XXX_Size() int

func (*ListTweetResponse) XXX_Unmarshal

func (m *ListTweetResponse) XXX_Unmarshal(b []byte) error

type ListTweetResponseValidationError

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

ListTweetResponseValidationError is the validation error returned by ListTweetResponse.Validate if the designated constraints aren't met.

func (ListTweetResponseValidationError) Cause

Cause function returns cause value.

func (ListTweetResponseValidationError) Error

Error satisfies the builtin error interface

func (ListTweetResponseValidationError) ErrorName

ErrorName returns error name.

func (ListTweetResponseValidationError) Field

Field function returns field value.

func (ListTweetResponseValidationError) Key

Key function returns key value.

func (ListTweetResponseValidationError) Reason

Reason function returns reason value.

type ListTweetResponse_Tweet

type ListTweetResponse_Tweet struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListTweetResponse_Tweet) Descriptor

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

func (*ListTweetResponse_Tweet) GetId

func (m *ListTweetResponse_Tweet) GetId() uint64

func (*ListTweetResponse_Tweet) GetMessage

func (m *ListTweetResponse_Tweet) GetMessage() string

func (*ListTweetResponse_Tweet) ProtoMessage

func (*ListTweetResponse_Tweet) ProtoMessage()

func (*ListTweetResponse_Tweet) Reset

func (m *ListTweetResponse_Tweet) Reset()

func (*ListTweetResponse_Tweet) String

func (m *ListTweetResponse_Tweet) String() string

func (*ListTweetResponse_Tweet) Validate

func (m *ListTweetResponse_Tweet) Validate() error

Validate checks the field values on ListTweetResponse_Tweet with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ListTweetResponse_Tweet) XXX_DiscardUnknown

func (m *ListTweetResponse_Tweet) XXX_DiscardUnknown()

func (*ListTweetResponse_Tweet) XXX_Marshal

func (m *ListTweetResponse_Tweet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTweetResponse_Tweet) XXX_Merge

func (m *ListTweetResponse_Tweet) XXX_Merge(src proto.Message)

func (*ListTweetResponse_Tweet) XXX_Size

func (m *ListTweetResponse_Tweet) XXX_Size() int

func (*ListTweetResponse_Tweet) XXX_Unmarshal

func (m *ListTweetResponse_Tweet) XXX_Unmarshal(b []byte) error

type ListTweetResponse_TweetValidationError

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

ListTweetResponse_TweetValidationError is the validation error returned by ListTweetResponse_Tweet.Validate if the designated constraints aren't met.

func (ListTweetResponse_TweetValidationError) Cause

Cause function returns cause value.

func (ListTweetResponse_TweetValidationError) Error

Error satisfies the builtin error interface

func (ListTweetResponse_TweetValidationError) ErrorName

ErrorName returns error name.

func (ListTweetResponse_TweetValidationError) Field

Field function returns field value.

func (ListTweetResponse_TweetValidationError) Key

Key function returns key value.

func (ListTweetResponse_TweetValidationError) Reason

Reason function returns reason value.

type LoginRequest

type LoginRequest struct {
	Email                string   `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoginRequest) Descriptor

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

func (*LoginRequest) GetEmail

func (m *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (m *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) Reset

func (m *LoginRequest) Reset()

func (*LoginRequest) String

func (m *LoginRequest) String() string

func (*LoginRequest) Validate

func (m *LoginRequest) Validate() error

Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*LoginRequest) XXX_DiscardUnknown

func (m *LoginRequest) XXX_DiscardUnknown()

func (*LoginRequest) XXX_Marshal

func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoginRequest) XXX_Merge

func (m *LoginRequest) XXX_Merge(src proto.Message)

func (*LoginRequest) XXX_Size

func (m *LoginRequest) XXX_Size() int

func (*LoginRequest) XXX_Unmarshal

func (m *LoginRequest) XXX_Unmarshal(b []byte) error

type LoginRequestValidationError

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

LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.

func (LoginRequestValidationError) Cause

Cause function returns cause value.

func (LoginRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginRequestValidationError) ErrorName

func (e LoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRequestValidationError) Field

Field function returns field value.

func (LoginRequestValidationError) Key

Key function returns key value.

func (LoginRequestValidationError) Reason

Reason function returns reason value.

type LoginResponse

type LoginResponse struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoginResponse) Descriptor

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

func (*LoginResponse) GetToken

func (m *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) Reset

func (m *LoginResponse) Reset()

func (*LoginResponse) String

func (m *LoginResponse) String() string

func (*LoginResponse) Validate

func (m *LoginResponse) Validate() error

Validate checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*LoginResponse) XXX_DiscardUnknown

func (m *LoginResponse) XXX_DiscardUnknown()

func (*LoginResponse) XXX_Marshal

func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoginResponse) XXX_Merge

func (m *LoginResponse) XXX_Merge(src proto.Message)

func (*LoginResponse) XXX_Size

func (m *LoginResponse) XXX_Size() int

func (*LoginResponse) XXX_Unmarshal

func (m *LoginResponse) XXX_Unmarshal(b []byte) error

type LoginResponseValidationError

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

LoginResponseValidationError is the validation error returned by LoginResponse.Validate if the designated constraints aren't met.

func (LoginResponseValidationError) Cause

Cause function returns cause value.

func (LoginResponseValidationError) Error

Error satisfies the builtin error interface

func (LoginResponseValidationError) ErrorName

func (e LoginResponseValidationError) ErrorName() string

ErrorName returns error name.

func (LoginResponseValidationError) Field

Field function returns field value.

func (LoginResponseValidationError) Key

Key function returns key value.

func (LoginResponseValidationError) Reason

Reason function returns reason value.

type RegisterRequest

type RegisterRequest struct {
	Email                string   `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Username             string   `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterRequest) Descriptor

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

func (*RegisterRequest) GetEmail

func (m *RegisterRequest) GetEmail() string

func (*RegisterRequest) GetPassword

func (m *RegisterRequest) GetPassword() string

func (*RegisterRequest) GetUsername

func (m *RegisterRequest) GetUsername() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) Reset

func (m *RegisterRequest) Reset()

func (*RegisterRequest) String

func (m *RegisterRequest) String() string

func (*RegisterRequest) Validate

func (m *RegisterRequest) Validate() error

Validate checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*RegisterRequest) XXX_DiscardUnknown

func (m *RegisterRequest) XXX_DiscardUnknown()

func (*RegisterRequest) XXX_Marshal

func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterRequest) XXX_Merge

func (m *RegisterRequest) XXX_Merge(src proto.Message)

func (*RegisterRequest) XXX_Size

func (m *RegisterRequest) XXX_Size() int

func (*RegisterRequest) XXX_Unmarshal

func (m *RegisterRequest) XXX_Unmarshal(b []byte) error

type RegisterRequestValidationError

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

RegisterRequestValidationError is the validation error returned by RegisterRequest.Validate if the designated constraints aren't met.

func (RegisterRequestValidationError) Cause

Cause function returns cause value.

func (RegisterRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterRequestValidationError) ErrorName

func (e RegisterRequestValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterRequestValidationError) Field

Field function returns field value.

func (RegisterRequestValidationError) Key

Key function returns key value.

func (RegisterRequestValidationError) Reason

Reason function returns reason value.

type RegisterResponse

type RegisterResponse struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterResponse) Descriptor

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

func (*RegisterResponse) GetId

func (m *RegisterResponse) GetId() uint64

func (*RegisterResponse) GetUsername

func (m *RegisterResponse) GetUsername() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) Reset

func (m *RegisterResponse) Reset()

func (*RegisterResponse) String

func (m *RegisterResponse) String() string

func (*RegisterResponse) Validate

func (m *RegisterResponse) Validate() error

Validate checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*RegisterResponse) XXX_DiscardUnknown

func (m *RegisterResponse) XXX_DiscardUnknown()

func (*RegisterResponse) XXX_Marshal

func (m *RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterResponse) XXX_Merge

func (m *RegisterResponse) XXX_Merge(src proto.Message)

func (*RegisterResponse) XXX_Size

func (m *RegisterResponse) XXX_Size() int

func (*RegisterResponse) XXX_Unmarshal

func (m *RegisterResponse) XXX_Unmarshal(b []byte) error

type RegisterResponseValidationError

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

RegisterResponseValidationError is the validation error returned by RegisterResponse.Validate if the designated constraints aren't met.

func (RegisterResponseValidationError) Cause

Cause function returns cause value.

func (RegisterResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterResponseValidationError) Field

Field function returns field value.

func (RegisterResponseValidationError) Key

Key function returns key value.

func (RegisterResponseValidationError) Reason

Reason function returns reason value.

type SubscribeRequest

type SubscribeRequest struct {
	Username             string   `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SubscribeRequest) Descriptor

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

func (*SubscribeRequest) GetUsername

func (m *SubscribeRequest) GetUsername() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) Validate

func (m *SubscribeRequest) Validate() error

Validate checks the field values on SubscribeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*SubscribeRequest) XXX_DiscardUnknown

func (m *SubscribeRequest) XXX_DiscardUnknown()

func (*SubscribeRequest) XXX_Marshal

func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubscribeRequest) XXX_Merge

func (m *SubscribeRequest) XXX_Merge(src proto.Message)

func (*SubscribeRequest) XXX_Size

func (m *SubscribeRequest) XXX_Size() int

func (*SubscribeRequest) XXX_Unmarshal

func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error

type SubscribeRequestValidationError

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

SubscribeRequestValidationError is the validation error returned by SubscribeRequest.Validate if the designated constraints aren't met.

func (SubscribeRequestValidationError) Cause

Cause function returns cause value.

func (SubscribeRequestValidationError) Error

Error satisfies the builtin error interface

func (SubscribeRequestValidationError) ErrorName

ErrorName returns error name.

func (SubscribeRequestValidationError) Field

Field function returns field value.

func (SubscribeRequestValidationError) Key

Key function returns key value.

func (SubscribeRequestValidationError) Reason

Reason function returns reason value.

type SubscribeResponse

type SubscribeResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SubscribeResponse) Descriptor

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

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) Reset

func (m *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (m *SubscribeResponse) String() string

func (*SubscribeResponse) Validate

func (m *SubscribeResponse) Validate() error

Validate checks the field values on SubscribeResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*SubscribeResponse) XXX_DiscardUnknown

func (m *SubscribeResponse) XXX_DiscardUnknown()

func (*SubscribeResponse) XXX_Marshal

func (m *SubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubscribeResponse) XXX_Merge

func (m *SubscribeResponse) XXX_Merge(src proto.Message)

func (*SubscribeResponse) XXX_Size

func (m *SubscribeResponse) XXX_Size() int

func (*SubscribeResponse) XXX_Unmarshal

func (m *SubscribeResponse) XXX_Unmarshal(b []byte) error

type SubscribeResponseValidationError

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

SubscribeResponseValidationError is the validation error returned by SubscribeResponse.Validate if the designated constraints aren't met.

func (SubscribeResponseValidationError) Cause

Cause function returns cause value.

func (SubscribeResponseValidationError) Error

Error satisfies the builtin error interface

func (SubscribeResponseValidationError) ErrorName

ErrorName returns error name.

func (SubscribeResponseValidationError) Field

Field function returns field value.

func (SubscribeResponseValidationError) Key

Key function returns key value.

func (SubscribeResponseValidationError) Reason

Reason function returns reason value.

type TweetServiceClient

type TweetServiceClient interface {
	CreateTweet(ctx context.Context, in *CreateTweetRequest, opts ...grpc.CallOption) (*CreateTweetResponse, error)
	ListTweet(ctx context.Context, in *ListTweetRequest, opts ...grpc.CallOption) (*ListTweetResponse, error)
}

TweetServiceClient is the client API for TweetService service.

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

func NewTweetServiceClient

func NewTweetServiceClient(cc *grpc.ClientConn) TweetServiceClient

type TweetServiceServer

type TweetServiceServer interface {
	CreateTweet(context.Context, *CreateTweetRequest) (*CreateTweetResponse, error)
	ListTweet(context.Context, *ListTweetRequest) (*ListTweetResponse, error)
}

TweetServiceServer is the server API for TweetService service.

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServiceServer) Login

func (*UnimplementedAuthServiceServer) Register

type UnimplementedTweetServiceServer

type UnimplementedTweetServiceServer struct {
}

UnimplementedTweetServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTweetServiceServer) CreateTweet

func (*UnimplementedTweetServiceServer) ListTweet

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServiceServer) Subscribe

type UserServiceClient

type UserServiceClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
}

UserServiceClient is the client API for UserService service.

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

func NewUserServiceClient

func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient

type UserServiceServer

type UserServiceServer interface {
	Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
}

UserServiceServer is the server API for UserService service.

Jump to

Keyboard shortcuts

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