contactmodel

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContactModel

type ContactModel struct {
	DB *domain.DB
	// contains filtered or unexported fields
}

ContactModel stores user contacts and their participation in appspaces

func (*ContactModel) Create

func (m *ContactModel) Create(userID domain.UserID, name string, displayName string) (domain.Contact, error)

Create a new contact

func (*ContactModel) Delete

func (m *ContactModel) Delete(userID domain.UserID, contactID domain.ContactID) error

Delete deletes

func (*ContactModel) Get

func (m *ContactModel) Get(contactID domain.ContactID) (domain.Contact, error)

Get returns a single contact

func (*ContactModel) GetForUser

func (m *ContactModel) GetForUser(userID domain.UserID) ([]domain.Contact, error)

GetForUser retusn all contacts for teh given user id

func (*ContactModel) PrepareStatements

func (m *ContactModel) PrepareStatements()

PrepareStatements for appspace model

func (*ContactModel) Update

func (m *ContactModel) Update(userID domain.UserID, contactID domain.ContactID, name string, displayName string) error

Update updates

Jump to

Keyboard shortcuts

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