rpc

package
v0.0.0-...-2c0f4b9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRpcConection

func GetRpcConection(conf *config.Config) (*grpc.ClientConn, error)

GetRpcConection - returns connection to grpc server

func RegisterTwProxyServiceServer

func RegisterTwProxyServiceServer(s *grpc.Server, srv TwProxyServiceServer)

Types

type TwProxyServiceClient

type TwProxyServiceClient interface {
	GetUserInfo(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserInfo, error)
	SearchUsers(ctx context.Context, in *UserSearchRequest, opts ...grpc.CallOption) (*UserSearchResult, error)
	GetUserTimeline(ctx context.Context, in *UserTimelineRequest, opts ...grpc.CallOption) (*UserTimelineResponse, error)
}

TwProxyServiceClient is the client API for TwProxyService service.

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

func GetRpcClient

func GetRpcClient(conn *grpc.ClientConn) TwProxyServiceClient

GetRpcClient - returns grpc client

func NewTwProxyServiceClient

func NewTwProxyServiceClient(cc *grpc.ClientConn) TwProxyServiceClient

type TwProxyServiceServer

type TwProxyServiceServer interface {
	GetUserInfo(context.Context, *UserInfoRequest) (*UserInfo, error)
	SearchUsers(context.Context, *UserSearchRequest) (*UserSearchResult, error)
	GetUserTimeline(context.Context, *UserTimelineRequest) (*UserTimelineResponse, error)
}

TwProxyServiceServer is the server API for TwProxyService service.

type Tweet

type Tweet struct {
	IdStr                string   `protobuf:"bytes,1,opt,name=id_str,json=idStr,proto3" json:"id_str,omitempty"`
	Text                 string   `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	FullText             string   `protobuf:"bytes,3,opt,name=full_text,json=fullText,proto3" json:"full_text,omitempty"`
	InReplyToStatusIdStr string   `` /* 129-byte string literal not displayed */
	InReplyToUserIdStr   string   `protobuf:"bytes,5,opt,name=in_reply_to_user_id_str,json=inReplyToUserIdStr,proto3" json:"in_reply_to_user_id_str,omitempty"`
	UserId               string   `protobuf:"bytes,6,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserName             string   `protobuf:"bytes,7,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	UserScreenName       string   `protobuf:"bytes,8,opt,name=user_screen_name,json=userScreenName,proto3" json:"user_screen_name,omitempty"`
	UserProfileImageUrl  string   `protobuf:"bytes,9,opt,name=user_profile_image_url,json=userProfileImageUrl,proto3" json:"user_profile_image_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Tweet) Descriptor

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

func (*Tweet) GetFullText

func (m *Tweet) GetFullText() string

func (*Tweet) GetIdStr

func (m *Tweet) GetIdStr() string

func (*Tweet) GetInReplyToStatusIdStr

func (m *Tweet) GetInReplyToStatusIdStr() string

func (*Tweet) GetInReplyToUserIdStr

func (m *Tweet) GetInReplyToUserIdStr() string

func (*Tweet) GetText

func (m *Tweet) GetText() string

func (*Tweet) GetUserId

func (m *Tweet) GetUserId() string

func (*Tweet) GetUserName

func (m *Tweet) GetUserName() string

func (*Tweet) GetUserProfileImageUrl

func (m *Tweet) GetUserProfileImageUrl() string

func (*Tweet) GetUserScreenName

func (m *Tweet) GetUserScreenName() string

func (*Tweet) ProtoMessage

func (*Tweet) ProtoMessage()

func (*Tweet) Reset

func (m *Tweet) Reset()

func (*Tweet) String

func (m *Tweet) String() string

func (*Tweet) XXX_DiscardUnknown

func (m *Tweet) XXX_DiscardUnknown()

func (*Tweet) XXX_Marshal

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

func (*Tweet) XXX_Merge

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

func (*Tweet) XXX_Size

func (m *Tweet) XXX_Size() int

func (*Tweet) XXX_Unmarshal

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

type UnimplementedTwProxyServiceServer

type UnimplementedTwProxyServiceServer struct {
}

UnimplementedTwProxyServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTwProxyServiceServer) GetUserInfo

func (*UnimplementedTwProxyServiceServer) GetUserTimeline

func (*UnimplementedTwProxyServiceServer) SearchUsers

type UserInfo

type UserInfo struct {
	TwitterId            string   `protobuf:"bytes,1,opt,name=twitter_id,json=twitterId,proto3" json:"twitter_id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email                string   `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	ScreenName           string   `protobuf:"bytes,4,opt,name=screen_name,json=screenName,proto3" json:"screen_name,omitempty"`
	ProfileImageUrl      string   `protobuf:"bytes,5,opt,name=profile_image_url,json=profileImageUrl,proto3" json:"profile_image_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserInfo) Descriptor

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

func (*UserInfo) GetEmail

func (m *UserInfo) GetEmail() string

func (*UserInfo) GetName

func (m *UserInfo) GetName() string

func (*UserInfo) GetProfileImageUrl

func (m *UserInfo) GetProfileImageUrl() string

func (*UserInfo) GetScreenName

func (m *UserInfo) GetScreenName() string

func (*UserInfo) GetTwitterId

func (m *UserInfo) GetTwitterId() string

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) Reset

func (m *UserInfo) Reset()

func (*UserInfo) String

func (m *UserInfo) String() string

func (*UserInfo) XXX_DiscardUnknown

func (m *UserInfo) XXX_DiscardUnknown()

func (*UserInfo) XXX_Marshal

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

func (*UserInfo) XXX_Merge

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

func (*UserInfo) XXX_Size

func (m *UserInfo) XXX_Size() int

func (*UserInfo) XXX_Unmarshal

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

type UserInfoRequest

type UserInfoRequest struct {
	AccessToken          string   `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	AccessSecret         string   `protobuf:"bytes,2,opt,name=access_secret,json=accessSecret,proto3" json:"access_secret,omitempty"`
	TwitterId            string   `protobuf:"bytes,3,opt,name=twitter_id,json=twitterId,proto3" json:"twitter_id,omitempty"`
	ScreenName           string   `protobuf:"bytes,4,opt,name=screen_name,json=screenName,proto3" json:"screen_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserInfoRequest) Descriptor

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

func (*UserInfoRequest) GetAccessSecret

func (m *UserInfoRequest) GetAccessSecret() string

func (*UserInfoRequest) GetAccessToken

func (m *UserInfoRequest) GetAccessToken() string

func (*UserInfoRequest) GetScreenName

func (m *UserInfoRequest) GetScreenName() string

func (*UserInfoRequest) GetTwitterId

func (m *UserInfoRequest) GetTwitterId() string

func (*UserInfoRequest) ProtoMessage

func (*UserInfoRequest) ProtoMessage()

func (*UserInfoRequest) Reset

func (m *UserInfoRequest) Reset()

func (*UserInfoRequest) String

func (m *UserInfoRequest) String() string

func (*UserInfoRequest) XXX_DiscardUnknown

func (m *UserInfoRequest) XXX_DiscardUnknown()

func (*UserInfoRequest) XXX_Marshal

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

func (*UserInfoRequest) XXX_Merge

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

func (*UserInfoRequest) XXX_Size

func (m *UserInfoRequest) XXX_Size() int

func (*UserInfoRequest) XXX_Unmarshal

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

type UserSearchRequest

type UserSearchRequest struct {
	AccessToken          string   `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	AccessSecret         string   `protobuf:"bytes,2,opt,name=access_secret,json=accessSecret,proto3" json:"access_secret,omitempty"`
	TwitterId            string   `protobuf:"bytes,3,opt,name=twitter_id,json=twitterId,proto3" json:"twitter_id,omitempty"`
	Query                string   `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserSearchRequest) Descriptor

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

func (*UserSearchRequest) GetAccessSecret

func (m *UserSearchRequest) GetAccessSecret() string

func (*UserSearchRequest) GetAccessToken

func (m *UserSearchRequest) GetAccessToken() string

func (*UserSearchRequest) GetQuery

func (m *UserSearchRequest) GetQuery() string

func (*UserSearchRequest) GetTwitterId

func (m *UserSearchRequest) GetTwitterId() string

func (*UserSearchRequest) ProtoMessage

func (*UserSearchRequest) ProtoMessage()

func (*UserSearchRequest) Reset

func (m *UserSearchRequest) Reset()

func (*UserSearchRequest) String

func (m *UserSearchRequest) String() string

func (*UserSearchRequest) XXX_DiscardUnknown

func (m *UserSearchRequest) XXX_DiscardUnknown()

func (*UserSearchRequest) XXX_Marshal

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

func (*UserSearchRequest) XXX_Merge

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

func (*UserSearchRequest) XXX_Size

func (m *UserSearchRequest) XXX_Size() int

func (*UserSearchRequest) XXX_Unmarshal

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

type UserSearchResult

type UserSearchResult struct {
	Users                []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*UserSearchResult) Descriptor

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

func (*UserSearchResult) GetUsers

func (m *UserSearchResult) GetUsers() []*UserInfo

func (*UserSearchResult) ProtoMessage

func (*UserSearchResult) ProtoMessage()

func (*UserSearchResult) Reset

func (m *UserSearchResult) Reset()

func (*UserSearchResult) String

func (m *UserSearchResult) String() string

func (*UserSearchResult) XXX_DiscardUnknown

func (m *UserSearchResult) XXX_DiscardUnknown()

func (*UserSearchResult) XXX_Marshal

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

func (*UserSearchResult) XXX_Merge

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

func (*UserSearchResult) XXX_Size

func (m *UserSearchResult) XXX_Size() int

func (*UserSearchResult) XXX_Unmarshal

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

type UserTimelineRequest

type UserTimelineRequest struct {
	AccessToken          string   `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	AccessSecret         string   `protobuf:"bytes,2,opt,name=access_secret,json=accessSecret,proto3" json:"access_secret,omitempty"`
	TwitterId            string   `protobuf:"bytes,3,opt,name=twitter_id,json=twitterId,proto3" json:"twitter_id,omitempty"`
	ScreenName           string   `protobuf:"bytes,4,opt,name=screen_name,json=screenName,proto3" json:"screen_name,omitempty"`
	SinceId              int64    `protobuf:"varint,5,opt,name=since_id,json=sinceId,proto3" json:"since_id,omitempty"`
	Count                int64    `protobuf:"varint,6,opt,name=count,proto3" json:"count,omitempty"`
	IgnoreRt             bool     `protobuf:"varint,7,opt,name=ignore_rt,json=ignoreRt,proto3" json:"ignore_rt,omitempty"`
	IgnoreReplies        bool     `protobuf:"varint,8,opt,name=ignore_replies,json=ignoreReplies,proto3" json:"ignore_replies,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserTimelineRequest) Descriptor

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

func (*UserTimelineRequest) GetAccessSecret

func (m *UserTimelineRequest) GetAccessSecret() string

func (*UserTimelineRequest) GetAccessToken

func (m *UserTimelineRequest) GetAccessToken() string

func (*UserTimelineRequest) GetCount

func (m *UserTimelineRequest) GetCount() int64

func (*UserTimelineRequest) GetIgnoreReplies

func (m *UserTimelineRequest) GetIgnoreReplies() bool

func (*UserTimelineRequest) GetIgnoreRt

func (m *UserTimelineRequest) GetIgnoreRt() bool

func (*UserTimelineRequest) GetScreenName

func (m *UserTimelineRequest) GetScreenName() string

func (*UserTimelineRequest) GetSinceId

func (m *UserTimelineRequest) GetSinceId() int64

func (*UserTimelineRequest) GetTwitterId

func (m *UserTimelineRequest) GetTwitterId() string

func (*UserTimelineRequest) ProtoMessage

func (*UserTimelineRequest) ProtoMessage()

func (*UserTimelineRequest) Reset

func (m *UserTimelineRequest) Reset()

func (*UserTimelineRequest) String

func (m *UserTimelineRequest) String() string

func (*UserTimelineRequest) XXX_DiscardUnknown

func (m *UserTimelineRequest) XXX_DiscardUnknown()

func (*UserTimelineRequest) XXX_Marshal

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

func (*UserTimelineRequest) XXX_Merge

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

func (*UserTimelineRequest) XXX_Size

func (m *UserTimelineRequest) XXX_Size() int

func (*UserTimelineRequest) XXX_Unmarshal

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

type UserTimelineResponse

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

func (*UserTimelineResponse) Descriptor

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

func (*UserTimelineResponse) GetTweets

func (m *UserTimelineResponse) GetTweets() []*Tweet

func (*UserTimelineResponse) ProtoMessage

func (*UserTimelineResponse) ProtoMessage()

func (*UserTimelineResponse) Reset

func (m *UserTimelineResponse) Reset()

func (*UserTimelineResponse) String

func (m *UserTimelineResponse) String() string

func (*UserTimelineResponse) XXX_DiscardUnknown

func (m *UserTimelineResponse) XXX_DiscardUnknown()

func (*UserTimelineResponse) XXX_Marshal

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

func (*UserTimelineResponse) XXX_Merge

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

func (*UserTimelineResponse) XXX_Size

func (m *UserTimelineResponse) XXX_Size() int

func (*UserTimelineResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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