profilemodel

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Code generated by go generate forge model v0.2.0. DO NOT EDIT.

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,TEXT" query:"profile_image_url"`
}

Model is the db profile model

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