persistence

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package persistence holds view models and repository interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User interface {
	GetID() string
	GetEmail() string
	GetFacebookID() string
	GetGoogleID() string
}

User the user persistence model interface

type UserRepository

type UserRepository interface {
	FindAll(ctx context.Context, limit, offset int32) ([]User, error)
	Get(ctx context.Context, id string) (User, error)
	Add(ctx context.Context, user User) error
	Delete(ctx context.Context, id string) error
	Count(ctx context.Context) (int32, error)
	UpdateEmail(ctx context.Context, id, email string) error
	UpdateFacebookID(ctx context.Context, id, facebookID string) error
	UpdateGoogleID(ctx context.Context, id, googleID string) error
}

UserRepository allows to get/save current state of user to mysql storage

Directories

Path Synopsis
Package mysql holds view model repositories Package mysql holds view model repositories
Package mysql holds view model repositories Package mysql holds view model repositories

Jump to

Keyboard shortcuts

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