contacts

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Db        state.DBManager
	IdManager id.Identity
}

type ContactInfo

type ContactInfo struct {
	Id           int64     `json:"id"`
	DID          string    `json:"did"`
	DIDDocument  string    `json:"didDocument"`
	Name         string    `json:"name"`
	UserDID      string    `json:"userDID"`
	HasContacted bool      `json:"hasContacted"`
	Metadata     string    `json:"metadata"`
	Added        time.Time `json:"added"`
}

type ContactUpdate

type ContactUpdate struct {
	Id       int64  `json:"id"`
	DID      string `json:"did"`
	Name     string `json:"name"`
	Metadata string `json:"metadata"`
}

type Contacts

type Contacts interface {
	GetContacts() ([]*ContactInfo, error)
	GetContact(id int64) (*ContactInfo, error)
	CreateContact(*ContactInfo) (*ContactInfo, error)
	UpdateContact(*ContactUpdate) (*ContactInfo, error)
	DeleteContact(int64) error
}

func New

func New(cfg *Config) (Contacts, error)

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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