Documentation ¶
Overview ¶
Package contacts is a generated protocol buffer package.
It is generated from these files:
example/contacts/contacts.proto
It has these top-level messages:
Contact ContactPage SearchRequest GetRequest SMSRequest
Package contacts is a generated protocol buffer package.
It is generated from these files:
example/contacts/contacts.proto
It has these top-level messages:
Contact ContactPage SearchRequest GetRequest SMSRequest
Index ¶
- func DefaultDeleteContact(ctx context.Context, in *Contact, db *gorm.DB) error
- func RegisterContactsServer(s *grpc.Server, srv ContactsServer)
- type Contact
- func ConvertContactFromORM(from ContactORM) (Contact, error)
- func DefaultCreateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)
- func DefaultListContact(ctx context.Context, db *gorm.DB) ([]*Contact, error)
- func DefaultReadContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)
- func DefaultStrictUpdateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)
- func DefaultUpdateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)
- func (*Contact) Descriptor() ([]byte, []int)
- func (m *Contact) GetEmailAddress() string
- func (m *Contact) GetFirstName() string
- func (m *Contact) GetId() uint64
- func (m *Contact) GetLastName() string
- func (m *Contact) GetMiddleName() string
- func (*Contact) ProtoMessage()
- func (m *Contact) Reset()
- func (m *Contact) String() string
- type ContactORM
- type ContactPage
- type ContactsClient
- type ContactsServer
- type GetRequest
- type SMSRequest
- type SearchRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDeleteContact ¶
func RegisterContactsServer ¶
func RegisterContactsServer(s *grpc.Server, srv ContactsServer)
Types ¶
type Contact ¶
type Contact struct { Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName" json:"first_name,omitempty"` MiddleName string `protobuf:"bytes,3,opt,name=middle_name,json=middleName" json:"middle_name,omitempty"` LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName" json:"last_name,omitempty"` EmailAddress string `protobuf:"bytes,5,opt,name=email_address,json=emailAddress" json:"email_address,omitempty"` }
func ConvertContactFromORM ¶
func ConvertContactFromORM(from ContactORM) (Contact, error)
ConvertContactFromORM takes an orm object and returns a pb object
func DefaultCreateContact ¶
//////////////////////// CURDL for objects DefaultCreateContact executes a basic gorm create call
func DefaultListContact ¶
DefaultListContact executes a gorm list call
func DefaultReadContact ¶
DefaultReadContact executes a basic gorm read call
func DefaultStrictUpdateContact ¶
DefaultStrictUpdateContact clears first level 1:many children and then executes a gorm update call
func DefaultUpdateContact ¶
DefaultUpdateContact executes a basic gorm update call
func (*Contact) Descriptor ¶
func (*Contact) GetEmailAddress ¶
func (*Contact) GetFirstName ¶
func (*Contact) GetLastName ¶
func (*Contact) GetMiddleName ¶
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
type ContactORM ¶
type ContactORM struct { AccountID string Id uint64 FirstName string MiddleName string LastName string EmailAddress string }
ContactORM no comment was provided for message type
func ConvertContactToORM ¶
func ConvertContactToORM(from Contact) (ContactORM, error)
ConvertContactToORM takes a pb object and returns an orm object
func (ContactORM) TableName ¶
func (ContactORM) TableName() string
TableName overrides the default tablename generated by GORM
type ContactPage ¶
type ContactPage struct {
Results []*Contact `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}
eventually this will be replaced with a Page that uses the paging info
func (*ContactPage) Descriptor ¶
func (*ContactPage) Descriptor() ([]byte, []int)
func (*ContactPage) GetResults ¶
func (m *ContactPage) GetResults() []*Contact
func (*ContactPage) ProtoMessage ¶
func (*ContactPage) ProtoMessage()
func (*ContactPage) Reset ¶
func (m *ContactPage) Reset()
func (*ContactPage) String ¶
func (m *ContactPage) String() string
type ContactsClient ¶
type ContactsClient interface { Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*ContactPage, error) Create(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*Contact, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Contact, error) Update(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*Contact, error) Delete(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) SendSMS(ctx context.Context, in *SMSRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) }
func NewContactsClient ¶
func NewContactsClient(cc *grpc.ClientConn) ContactsClient
type ContactsServer ¶
type ContactsServer interface { Search(context.Context, *SearchRequest) (*ContactPage, error) Create(context.Context, *Contact) (*Contact, error) Get(context.Context, *GetRequest) (*Contact, error) Update(context.Context, *Contact) (*Contact, error) Delete(context.Context, *GetRequest) (*google_protobuf.Empty, error) SendSMS(context.Context, *SMSRequest) (*google_protobuf.Empty, error) }
type GetRequest ¶
type GetRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetId ¶
func (m *GetRequest) GetId() uint64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type SMSRequest ¶
type SMSRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` }
func (*SMSRequest) Descriptor ¶
func (*SMSRequest) Descriptor() ([]byte, []int)
func (*SMSRequest) GetId ¶
func (m *SMSRequest) GetId() uint64
func (*SMSRequest) GetMessage ¶
func (m *SMSRequest) GetMessage() string
func (*SMSRequest) ProtoMessage ¶
func (*SMSRequest) ProtoMessage()
func (*SMSRequest) Reset ¶
func (m *SMSRequest) Reset()
func (*SMSRequest) String ¶
func (m *SMSRequest) String() string
type SearchRequest ¶
type SearchRequest struct {
FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName" json:"first_name,omitempty"`
}
eventually this will be replaced with a standard search request
func (*SearchRequest) Descriptor ¶
func (*SearchRequest) Descriptor() ([]byte, []int)
func (*SearchRequest) GetFirstName ¶
func (m *SearchRequest) GetFirstName() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) Reset ¶
func (m *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (m *SearchRequest) String() string