couriermodel

package
Version: 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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandModel

type BrandModel struct {
	BrandID      string `model:"brandid,VARCHAR(63) PRIMARY KEY" query:"brandid,getoneeq,brandid;deleq,brandid"`
	CreatorID    string `model:"creatorid,VARCHAR(31) NOT NULL;index" query:"creatorid"`
	CreationTime int64  `model:"creation_time,BIGINT NOT NULL" query:"creation_time,getgroup;getgroupeq,creatorid"`
}

BrandModel is the db brand model

type LinkModel

type LinkModel struct {
	LinkID       string `model:"linkid,VARCHAR(63) PRIMARY KEY" query:"linkid,getoneeq,linkid;deleq,linkid"`
	URL          string `model:"url,VARCHAR(2047) NOT NULL" query:"url"`
	CreatorID    string `model:"creatorid,VARCHAR(31) NOT NULL;index" query:"creatorid"`
	CreationTime int64  `model:"creation_time,BIGINT NOT NULL" query:"creation_time,getgroup;getgroupeq,creatorid"`
}

LinkModel is the db link model

type Repo

type Repo interface {
	NewLink(linkid, url, creatorid string) *LinkModel
	NewLinkAuto(url, creatorid string) (*LinkModel, error)
	NewLinkEmpty() LinkModel
	NewLinkEmptyPtr() *LinkModel
	GetLinkGroup(limit, offset int, creatorid string) ([]LinkModel, error)
	GetLink(linkid string) (*LinkModel, error)
	InsertLink(m *LinkModel) error
	DeleteLink(m *LinkModel) error
	NewBrand(brandid, creatorid string) *BrandModel
	GetBrandGroup(limit, offset int) ([]BrandModel, error)
	GetBrand(brandid string) (*BrandModel, error)
	InsertBrand(m *BrandModel) error
	DeleteBrand(m *BrandModel) error
	Setup() error
}

Repo is a courier repository

func New

func New(database db.Database) Repo

New creates a new courier repo

Jump to

Keyboard shortcuts

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