contacts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDeleteContact

func DefaultDeleteContact(ctx context.Context, in *Contact, db *gorm.DB) error

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

func DefaultCreateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)

//////////////////////// CURDL for objects DefaultCreateContact executes a basic gorm create call

func DefaultListContact

func DefaultListContact(ctx context.Context, db *gorm.DB) ([]*Contact, error)

DefaultListContact executes a gorm list call

func DefaultReadContact

func DefaultReadContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)

DefaultReadContact executes a basic gorm read call

func DefaultStrictUpdateContact

func DefaultStrictUpdateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)

DefaultStrictUpdateContact clears first level 1:many children and then executes a gorm update call

func DefaultUpdateContact

func DefaultUpdateContact(ctx context.Context, in *Contact, db *gorm.DB) (*Contact, error)

DefaultUpdateContact executes a basic gorm update call

func (*Contact) Descriptor

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

func (*Contact) GetEmailAddress

func (m *Contact) GetEmailAddress() string

func (*Contact) GetFirstName

func (m *Contact) GetFirstName() string

func (*Contact) GetId

func (m *Contact) GetId() uint64

func (*Contact) GetLastName

func (m *Contact) GetLastName() string

func (*Contact) GetMiddleName

func (m *Contact) GetMiddleName() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) Reset

func (m *Contact) Reset()

func (*Contact) String

func (m *Contact) String() string

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 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

Jump to

Keyboard shortcuts

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