contact

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_contact_proto protoreflect.FileDescriptor

Functions

func NewContactEndpoints

func NewContactEndpoints() []*api.Endpoint

func RegisterContactHandler

func RegisterContactHandler(s server.Server, hdlr ContactHandler, opts ...server.HandlerOption) error

Types

type Address

type Address struct {

	// the label of the address
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// the address location
	Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetLabel

func (x *Address) GetLabel() string

func (*Address) GetLocation

func (x *Address) GetLocation() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

func (x *Address) ProtoReflect() protoreflect.Message

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type ContactInfo

type ContactInfo struct {

	// contact id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// the contact name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// the phone numbers
	Phones []*Phone `protobuf:"bytes,3,rep,name=phones,proto3" json:"phones,omitempty"`
	// the emails
	Emails []*Email `protobuf:"bytes,4,rep,name=emails,proto3" json:"emails,omitempty"`
	// the contact links
	Links []*Link `protobuf:"bytes,5,rep,name=links,proto3" json:"links,omitempty"`
	// the birthday
	Birthday string `protobuf:"bytes,6,opt,name=birthday,proto3" json:"birthday,omitempty"`
	// the address
	Addresses []*Address `protobuf:"bytes,7,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// the social media username
	SocialMedias []*SocialMedia `protobuf:"bytes,8,rep,name=social_medias,json=socialMedias,proto3" json:"social_medias,omitempty"`
	// note of the contact
	Note string `protobuf:"bytes,9,opt,name=note,proto3" json:"note,omitempty"`
	// create date string in RFC3339
	CreatedAt string `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// update date string in RFC3339
	UpdatedAt string `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ContactInfo) Descriptor deprecated

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

Deprecated: Use ContactInfo.ProtoReflect.Descriptor instead.

func (*ContactInfo) GetAddresses

func (x *ContactInfo) GetAddresses() []*Address

func (*ContactInfo) GetBirthday

func (x *ContactInfo) GetBirthday() string

func (*ContactInfo) GetCreatedAt

func (x *ContactInfo) GetCreatedAt() string

func (*ContactInfo) GetEmails

func (x *ContactInfo) GetEmails() []*Email

func (*ContactInfo) GetId

func (x *ContactInfo) GetId() string
func (x *ContactInfo) GetLinks() []*Link

func (*ContactInfo) GetName

func (x *ContactInfo) GetName() string

func (*ContactInfo) GetNote

func (x *ContactInfo) GetNote() string

func (*ContactInfo) GetPhones

func (x *ContactInfo) GetPhones() []*Phone

func (*ContactInfo) GetSocialMedias

func (x *ContactInfo) GetSocialMedias() []*SocialMedia

func (*ContactInfo) GetUpdatedAt

func (x *ContactInfo) GetUpdatedAt() string

func (*ContactInfo) ProtoMessage

func (*ContactInfo) ProtoMessage()

func (*ContactInfo) ProtoReflect

func (x *ContactInfo) ProtoReflect() protoreflect.Message

func (*ContactInfo) Reset

func (x *ContactInfo) Reset()

func (*ContactInfo) String

func (x *ContactInfo) String() string

type ContactService

type ContactService interface {
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
}

func NewContactService

func NewContactService(name string, c client.Client) ContactService

type CreateRequest

type CreateRequest struct {

	// required, the name of the contact
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// optional, phone numbers
	Phones []*Phone `protobuf:"bytes,2,rep,name=phones,proto3" json:"phones,omitempty"`
	// optional, emails
	Emails []*Email `protobuf:"bytes,3,rep,name=emails,proto3" json:"emails,omitempty"`
	// optional, links
	Links []*Link `protobuf:"bytes,4,rep,name=links,proto3" json:"links,omitempty"`
	// optional, birthday
	Birthday string `protobuf:"bytes,5,opt,name=birthday,proto3" json:"birthday,omitempty"`
	// optional, location
	Addresses []*Address `protobuf:"bytes,6,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// optional, social media
	SocialMedias []*SocialMedia `protobuf:"bytes,7,rep,name=social_medias,json=socialMedias,proto3" json:"social_medias,omitempty"`
	// optional, note of the contact
	Note string `protobuf:"bytes,8,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetAddresses

func (x *CreateRequest) GetAddresses() []*Address

func (*CreateRequest) GetBirthday

func (x *CreateRequest) GetBirthday() string

func (*CreateRequest) GetEmails

func (x *CreateRequest) GetEmails() []*Email
func (x *CreateRequest) GetLinks() []*Link

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

func (*CreateRequest) GetNote

func (x *CreateRequest) GetNote() string

func (*CreateRequest) GetPhones

func (x *CreateRequest) GetPhones() []*Phone

func (*CreateRequest) GetSocialMedias

func (x *CreateRequest) GetSocialMedias() []*SocialMedia

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Contact *ContactInfo `protobuf:"bytes,1,opt,name=contact,proto3" json:"contact,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetContact

func (x *CreateResponse) GetContact() *ContactInfo

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {

	// the id of the contact
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Email

type Email struct {

	// the label of the email
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// the email address
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*Email) Descriptor deprecated

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

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetAddress

func (x *Email) GetAddress() string

func (*Email) GetLabel

func (x *Email) GetLabel() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

func (x *Email) ProtoReflect() protoreflect.Message

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string
type Link struct {

	// the label of the link
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// the url of the contact
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*Link) Descriptor deprecated

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

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) GetLabel

func (x *Link) GetLabel() string

func (*Link) GetUrl

func (x *Link) GetUrl() string

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

func (x *Link) ProtoReflect() protoreflect.Message

func (*Link) Reset

func (x *Link) Reset()

func (*Link) String

func (x *Link) String() string

type ListRequest

type ListRequest struct {

	// optional
	Offset uint32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// optional, default is 30
	Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() uint32

func (*ListRequest) GetOffset

func (x *ListRequest) GetOffset() uint32

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Contacts []*ContactInfo `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetContacts

func (x *ListResponse) GetContacts() []*ContactInfo

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Phone

type Phone struct {

	// the label of the phone number
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// phone number
	Number string `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*Phone) Descriptor deprecated

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

Deprecated: Use Phone.ProtoReflect.Descriptor instead.

func (*Phone) GetLabel

func (x *Phone) GetLabel() string

func (*Phone) GetNumber

func (x *Phone) GetNumber() string

func (*Phone) ProtoMessage

func (*Phone) ProtoMessage()

func (*Phone) ProtoReflect

func (x *Phone) ProtoReflect() protoreflect.Message

func (*Phone) Reset

func (x *Phone) Reset()

func (*Phone) String

func (x *Phone) String() string

type ReadRequest

type ReadRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

func (x *ReadRequest) ProtoReflect() protoreflect.Message

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {
	Contact *ContactInfo `protobuf:"bytes,1,opt,name=contact,proto3" json:"contact,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetContact

func (x *ReadResponse) GetContact() *ContactInfo

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type SocialMedia

type SocialMedia struct {

	// the label of the social
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// the username of social media
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*SocialMedia) Descriptor deprecated

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

Deprecated: Use SocialMedia.ProtoReflect.Descriptor instead.

func (*SocialMedia) GetLabel

func (x *SocialMedia) GetLabel() string

func (*SocialMedia) GetUsername

func (x *SocialMedia) GetUsername() string

func (*SocialMedia) ProtoMessage

func (*SocialMedia) ProtoMessage()

func (*SocialMedia) ProtoReflect

func (x *SocialMedia) ProtoReflect() protoreflect.Message

func (*SocialMedia) Reset

func (x *SocialMedia) Reset()

func (*SocialMedia) String

func (x *SocialMedia) String() string

type UpdateRequest

type UpdateRequest struct {

	// required, the contact id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// required, the name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// optional, phone number
	Phones []*Phone `protobuf:"bytes,3,rep,name=phones,proto3" json:"phones,omitempty"`
	// optional, emails
	Emails []*Email `protobuf:"bytes,4,rep,name=emails,proto3" json:"emails,omitempty"`
	// optional, links
	Links []*Link `protobuf:"bytes,5,rep,name=links,proto3" json:"links,omitempty"`
	// optional, birthday
	Birthday string `protobuf:"bytes,6,opt,name=birthday,proto3" json:"birthday,omitempty"`
	// optional, addresses
	Addresses []*Address `protobuf:"bytes,7,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// optional, social media
	SocialMedias []*SocialMedia `protobuf:"bytes,8,rep,name=social_medias,json=socialMedias,proto3" json:"social_medias,omitempty"`
	// optional, note
	Note string `protobuf:"bytes,9,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetAddresses

func (x *UpdateRequest) GetAddresses() []*Address

func (*UpdateRequest) GetBirthday

func (x *UpdateRequest) GetBirthday() string

func (*UpdateRequest) GetEmails

func (x *UpdateRequest) GetEmails() []*Email

func (*UpdateRequest) GetId

func (x *UpdateRequest) GetId() string
func (x *UpdateRequest) GetLinks() []*Link

func (*UpdateRequest) GetName

func (x *UpdateRequest) GetName() string

func (*UpdateRequest) GetNote

func (x *UpdateRequest) GetNote() string

func (*UpdateRequest) GetPhones

func (x *UpdateRequest) GetPhones() []*Phone

func (*UpdateRequest) GetSocialMedias

func (x *UpdateRequest) GetSocialMedias() []*SocialMedia

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

type UpdateResponse struct {
	Contact *ContactInfo `protobuf:"bytes,1,opt,name=contact,proto3" json:"contact,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetContact

func (x *UpdateResponse) GetContact() *ContactInfo

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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