Documentation
¶
Index ¶
- func RegisterMailServer(s *grpc.Server, srv MailServer)
- func UID() string
- type Clue
- type Glue
- type MailClient
- type MailServer
- type Note
- func (*Note) Descriptor() ([]byte, []int)
- func (m *Note) GetCredentials() string
- func (m *Note) GetData() []byte
- func (m *Note) GetDataContentType() string
- func (m *Note) GetId() string
- func (m *Note) GetSource() string
- func (m *Note) GetTime() string
- func (m *Note) GetType() string
- func (m *Note) GetVersion() string
- func (*Note) ProtoMessage()
- func (m *Note) Reset()
- func (m *Note) String() string
- func (m *Note) XXX_DiscardUnknown()
- func (m *Note) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Note) XXX_Merge(src proto.Message)
- func (m *Note) XXX_Size() int
- func (m *Note) XXX_Unmarshal(b []byte) error
- type Pakt
- func (*Pakt) Descriptor() ([]byte, []int)
- func (m *Pakt) GetNotes() []*Note
- func (m *Pakt) GetTime() string
- func (*Pakt) ProtoMessage()
- func (m *Pakt) Reset()
- func (m *Pakt) String() string
- func (m *Pakt) XXX_DiscardUnknown()
- func (m *Pakt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pakt) XXX_Merge(src proto.Message)
- func (m *Pakt) XXX_Size() int
- func (m *Pakt) XXX_Unmarshal(b []byte) error
- type When
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMailServer ¶ added in v0.4.0
func RegisterMailServer(s *grpc.Server, srv MailServer)
Types ¶
type Clue ¶ added in v0.5.1
type Clue struct {
Addr string
Port string
UseTLS bool
CertPath string
KeyPath string
// contains filtered or unexported fields
}
Clue is the Client Glue struct
type Glue ¶ added in v0.5.0
type Glue struct {
MS MailServer
Addr string
Port string
UseTLS bool
CertPath string
KeyPath string
// contains filtered or unexported fields
}
Glue holds some basic pieces to run the gRPC server. Specify UseTLS, CertPath, and KeyPath to enable TLS.
type MailClient ¶ added in v0.4.0
type MailClient interface {
// Sends a greeting
Ship(ctx context.Context, in *Pakt, opts ...grpc.CallOption) (*Pakt, error)
}
MailClient is the client API for Mail service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMailClient ¶ added in v0.4.0
func NewMailClient(cc *grpc.ClientConn) MailClient
type MailServer ¶ added in v0.4.0
MailServer is the server API for Mail service.
type Note ¶
type Note struct {
// Version is a field to include the Noted version
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// Time is the time in RFC3339 format
Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
// Type is the message type
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
// Source is the source of the note
Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
// Id is the unique id of the message
Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
// Credentials a field for storing credentials
Credentials string `protobuf:"bytes,6,opt,name=credentials,proto3" json:"credentials,omitempty"`
// DataContentType stores the content type of the data field
DataContentType string `protobuf:"bytes,7,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
// Data holds any binary message including other protos
Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Note represents the transit time message
func (*Note) Descriptor ¶
func (*Note) GetCredentials ¶
func (*Note) GetDataContentType ¶
func (*Note) GetVersion ¶
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) XXX_DiscardUnknown ¶
func (m *Note) XXX_DiscardUnknown()
func (*Note) XXX_Unmarshal ¶
type Pakt ¶ added in v0.4.0
type Pakt struct {
// Time is the RFC3339 string for datetime
Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
// Notes is the set of Notes that are to be sent
Notes []*Note `protobuf:"bytes,2,rep,name=notes,proto3" json:"notes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Pakt is a set of notes with a timestamp
func (*Pakt) Descriptor ¶ added in v0.4.0
func (*Pakt) ProtoMessage ¶ added in v0.4.0
func (*Pakt) ProtoMessage()
func (*Pakt) XXX_DiscardUnknown ¶ added in v0.4.0
func (m *Pakt) XXX_DiscardUnknown()
func (*Pakt) XXX_Marshal ¶ added in v0.4.0
func (*Pakt) XXX_Unmarshal ¶ added in v0.4.0
type When ¶ added in v0.5.0
type When struct {
// ST is the string time
ST string
// GT is the Go Time (time struct)
GT time.Time
// contains filtered or unexported fields
}
When is a struct that holds time values
Click to show internal directories.
Click to hide internal directories.