go-api-boilerplate: github.com/vardius/go-api-boilerplate/cmd/user/internal/infrastructure/persistence Index | Files | Directories

package persistence

import "github.com/vardius/go-api-boilerplate/cmd/user/internal/infrastructure/persistence"

Package persistence holds view models and repository interfaces


Package Files


type User Uses

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

User the user persistence model interface

type UserRepository Uses

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


mysqlPackage mysql holds view model repositories

Package persistence imports 1 packages (graph) and is imported by 6 packages. Updated 2020-08-04. Refresh now. Tools for package owners.