Documentation
¶
Index ¶
- Variables
- func NewEmojiEndpoints() []*api.Endpoint
- func RegisterEmojiHandler(s server.Server, hdlr EmojiHandler, opts ...server.HandlerOption) error
- type EmojiHandler
- type EmojiService
- type FindRequest
- type FindResponse
- type FlagRequest
- type FlagResponse
- type PrintRequest
- type PrintResponse
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetFrom() string
- func (x *SendRequest) GetMessage() string
- func (x *SendRequest) GetTo() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SendResponse
Constants ¶
This section is empty.
Variables ¶
var File_proto_emoji_proto protoreflect.FileDescriptor
Functions ¶
func NewEmojiEndpoints ¶
func RegisterEmojiHandler ¶
func RegisterEmojiHandler(s server.Server, hdlr EmojiHandler, opts ...server.HandlerOption) error
Types ¶
type EmojiHandler ¶
type EmojiHandler interface {
Find(context.Context, *FindRequest, *FindResponse) error
Flag(context.Context, *FlagRequest, *FlagResponse) error
Print(context.Context, *PrintRequest, *PrintResponse) error
Send(context.Context, *SendRequest, *SendResponse) error
}
type EmojiService ¶
type EmojiService interface {
Find(ctx context.Context, in *FindRequest, opts ...client.CallOption) (*FindResponse, error)
Flag(ctx context.Context, in *FlagRequest, opts ...client.CallOption) (*FlagResponse, error)
Print(ctx context.Context, in *PrintRequest, opts ...client.CallOption) (*PrintResponse, error)
Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error)
}
func NewEmojiService ¶
func NewEmojiService(name string, c client.Client) EmojiService
type FindRequest ¶
type FindRequest struct {
// the alias code e.g :beer:
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
// contains filtered or unexported fields
}
Find an emoji by its alias e.g :beer:
func (*FindRequest) Descriptor
deprecated
func (*FindRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindRequest.ProtoReflect.Descriptor instead.
func (*FindRequest) GetAlias ¶
func (x *FindRequest) GetAlias() string
func (*FindRequest) ProtoMessage ¶
func (*FindRequest) ProtoMessage()
func (*FindRequest) ProtoReflect ¶
func (x *FindRequest) ProtoReflect() protoreflect.Message
func (*FindRequest) Reset ¶
func (x *FindRequest) Reset()
func (*FindRequest) String ¶
func (x *FindRequest) String() string
type FindResponse ¶
type FindResponse struct {
// the unicode emoji 🍺
Emoji string `protobuf:"bytes,2,opt,name=emoji,proto3" json:"emoji,omitempty"`
// contains filtered or unexported fields
}
func (*FindResponse) Descriptor
deprecated
func (*FindResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindResponse.ProtoReflect.Descriptor instead.
func (*FindResponse) GetEmoji ¶
func (x *FindResponse) GetEmoji() string
func (*FindResponse) ProtoMessage ¶
func (*FindResponse) ProtoMessage()
func (*FindResponse) ProtoReflect ¶
func (x *FindResponse) ProtoReflect() protoreflect.Message
func (*FindResponse) Reset ¶
func (x *FindResponse) Reset()
func (*FindResponse) String ¶
func (x *FindResponse) String() string
type FlagRequest ¶
type FlagRequest struct {
// country code e.g GB
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
// contains filtered or unexported fields
}
Get the flag for a country. Requires country code e.g GB for great britain
func (*FlagRequest) Descriptor
deprecated
func (*FlagRequest) Descriptor() ([]byte, []int)
Deprecated: Use FlagRequest.ProtoReflect.Descriptor instead.
func (*FlagRequest) GetCode ¶
func (x *FlagRequest) GetCode() string
func (*FlagRequest) ProtoMessage ¶
func (*FlagRequest) ProtoMessage()
func (*FlagRequest) ProtoReflect ¶
func (x *FlagRequest) ProtoReflect() protoreflect.Message
func (*FlagRequest) Reset ¶
func (x *FlagRequest) Reset()
func (*FlagRequest) String ¶
func (x *FlagRequest) String() string
type FlagResponse ¶
type FlagResponse struct {
// the emoji flag
Flag string `protobuf:"bytes,2,opt,name=flag,proto3" json:"flag,omitempty"`
// contains filtered or unexported fields
}
func (*FlagResponse) Descriptor
deprecated
func (*FlagResponse) Descriptor() ([]byte, []int)
Deprecated: Use FlagResponse.ProtoReflect.Descriptor instead.
func (*FlagResponse) GetFlag ¶
func (x *FlagResponse) GetFlag() string
func (*FlagResponse) ProtoMessage ¶
func (*FlagResponse) ProtoMessage()
func (*FlagResponse) ProtoReflect ¶
func (x *FlagResponse) ProtoReflect() protoreflect.Message
func (*FlagResponse) Reset ¶
func (x *FlagResponse) Reset()
func (*FlagResponse) String ¶
func (x *FlagResponse) String() string
type PrintRequest ¶
type PrintRequest struct {
// text including any alias e.g let's grab a :beer:
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
Print text and renders the emojis with aliases e.g let's grab a :beer: becomes let's grab a 🍺
func (*PrintRequest) Descriptor
deprecated
func (*PrintRequest) Descriptor() ([]byte, []int)
Deprecated: Use PrintRequest.ProtoReflect.Descriptor instead.
func (*PrintRequest) GetText ¶
func (x *PrintRequest) GetText() string
func (*PrintRequest) ProtoMessage ¶
func (*PrintRequest) ProtoMessage()
func (*PrintRequest) ProtoReflect ¶
func (x *PrintRequest) ProtoReflect() protoreflect.Message
func (*PrintRequest) Reset ¶
func (x *PrintRequest) Reset()
func (*PrintRequest) String ¶
func (x *PrintRequest) String() string
type PrintResponse ¶
type PrintResponse struct {
// text with rendered emojis
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
func (*PrintResponse) Descriptor
deprecated
func (*PrintResponse) Descriptor() ([]byte, []int)
Deprecated: Use PrintResponse.ProtoReflect.Descriptor instead.
func (*PrintResponse) GetText ¶
func (x *PrintResponse) GetText() string
func (*PrintResponse) ProtoMessage ¶
func (*PrintResponse) ProtoMessage()
func (*PrintResponse) ProtoReflect ¶
func (x *PrintResponse) ProtoReflect() protoreflect.Message
func (*PrintResponse) Reset ¶
func (x *PrintResponse) Reset()
func (*PrintResponse) String ¶
func (x *PrintResponse) String() string
type SendRequest ¶
type SendRequest struct {
// who the message is from e.g Alice
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
// phone number to send to (including international dialing code)
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
// message to send including emoji aliases
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Send an emoji to anyone via SMS
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetFrom ¶
func (x *SendRequest) GetFrom() string
func (*SendRequest) GetMessage ¶
func (x *SendRequest) GetMessage() string
func (*SendRequest) GetTo ¶
func (x *SendRequest) GetTo() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SendResponse ¶
type SendResponse struct {
// whether or not it succeeded
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*SendResponse) Descriptor
deprecated
func (*SendResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) GetSuccess ¶
func (x *SendResponse) GetSuccess() bool
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) ProtoReflect ¶
func (x *SendResponse) ProtoReflect() protoreflect.Message
func (*SendResponse) Reset ¶
func (x *SendResponse) Reset()
func (*SendResponse) String ¶
func (x *SendResponse) String() string