profilemodel

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Userid string `model:"userid,VARCHAR(31) PRIMARY KEY" query:"userid,getoneeq,userid;updeq,userid;deleq,userid"`
	Email  string `model:"contact_email,VARCHAR(255)" query:"contact_email"`
	Bio    string `model:"bio,VARCHAR(4095)" query:"bio"`
	Image  string `model:"profile_image_url,VARCHAR(4095)" query:"profile_image_url"`
}

Model is the db profile model Image should be mostly be under 1024

type Repo

type Repo interface {
	New(userid, email, bio string) (*Model, error)
	GetByID(userid string) (*Model, error)
	Insert(m *Model) error
	Update(m *Model) error
	Delete(m *Model) error
	Setup() error
}

func New

func New(db db.Database) Repo

New creates a new profile repo

Jump to

Keyboard shortcuts

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