addressbook

package
v0.0.0-...-8439692 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContactRequest

type ContactRequest struct {
	ID         int64  `json:"id"`
	TenantID   int64  `json:"tenant_id"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	Active     bool   `json:"active"`
	Address    string `json:"address"`
	SomeSecret string `json:"some_secret" encryption:"true"`
}

type ContactResponse

type ContactResponse struct {
	ID         int64  `json:"id"`
	TenantID   int64  `json:"tenant_id"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	Active     bool   `json:"active"`
	Address    string `json:"address"`
	SomeSecret string `json:"some_secret" encryption:"true"`
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
}

type DeleteContactRequest

type DeleteContactRequest struct {
	ID int64 `json:"id"`
}

type Endpoints

type Endpoints struct {
	CreateContactEP endpoint.Endpoint
	ReadContactEP   endpoint.Endpoint
	ListContactsEP  endpoint.Endpoint
	UpdateContactEP endpoint.Endpoint
	DeleteContactEP endpoint.Endpoint
}

func (Endpoints) CreateContact

func (e Endpoints) CreateContact(ctx context.Context, requ *ContactRequest) (resp *ContactResponse, err error)

func (Endpoints) DeleteContact

func (e Endpoints) DeleteContact(ctx context.Context, requ *DeleteContactRequest) (resp *ContactResponse, err error)

func (Endpoints) ListContacts

func (e Endpoints) ListContacts(ctx context.Context, requ *ListContactsRequest) (resp *ListContactsResponse, err error)

func (Endpoints) ReadContact

func (e Endpoints) ReadContact(ctx context.Context, requ *ReadContactRequest) (resp *ContactResponse, err error)

func (Endpoints) UpdateContact

func (e Endpoints) UpdateContact(ctx context.Context, requ *ContactRequest) (resp *ContactResponse, err error)

type ListContactsRequest

type ListContactsRequest struct {
	PageToken int64 `json:"page_token"`
	PageSize  int32 `json:"page_size"`
}

type ListContactsResponse

type ListContactsResponse struct {
	ContactResponses []*ContactResponse
	NextPageToken    int64 `json:"next_page_token"`
}

type ReadContactRequest

type ReadContactRequest struct {
	ID int64 `json:"id"`
}

type StandardPayloadError

type StandardPayloadError struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message"`
}

type StandardPayloadResponse

type StandardPayloadResponse struct {
	Data          []any                  `json:"data"`
	NextPageToken int64                  `json:"next_page_token"`
	Errors        []StandardPayloadError `json:"errors"`
	CorrelationID string                 `json:"correlation_id"`
}

Data is an array of ContactResponse structs

Jump to

Keyboard shortcuts

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