models

package
v0.0.0-...-65b8bb6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2015 License: BSD-3-Clause Imports: 3 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 {
	DBSession *sql.DB
}

func (*Model) DeleteResourceById

func (m *Model) DeleteResourceById(userId, resourceId string) error

func (*Model) GetResourceById

func (m *Model) GetResourceById(userId, resourceId string) (*Resource, error)

func (*Model) GetResources

func (m *Model) GetResources(userId string, offset, limit int) ([]Resource, error)

func (*Model) InitDB

func (m *Model) InitDB(dbUri string)

func (*Model) InsertResource

func (m *Model) InsertResource(resource *Resource) error

func (*Model) InsertResourceWithTransaction

func (m *Model) InsertResourceWithTransaction(resource *Resource) error

func (*Model) ResourceExists

func (m *Model) ResourceExists(resourceId string) (bool, error)

func (*Model) UpdateResource

func (m *Model) UpdateResource(resource *Resource, userId string) error

type Resource

type Resource struct {
	Id   string `json:"id"`
	Href string `json:"href"`
}

Jump to

Keyboard shortcuts

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