repository

package
v0.0.0-...-ef83997 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package repository contains interfaces used by our repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExists

func CheckExists(ctx context.Context, db *gorm.DB, tableName string, id uuid.UUID) error

CheckExists does the same as Exists but only returns the error value; thereby being a handy convenience function.

func Exists

func Exists(ctx context.Context, db *gorm.DB, tableName string, id string) (bool, error)

Exists returns true if an item exists in the database table with a given ID

Types

type Exister

type Exister interface {
	// CheckExists returns nil if the object with the given ID exists; otherwise an
	// error is returned in case the given ID doesn't exists or any other
	// unknown issue occured
	CheckExists(ctx context.Context, id uuid.UUID) error
}

Jump to

Keyboard shortcuts

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