postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package postgres contains the database implementation of clients repository layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migration

func Migration() *migrate.MemoryMigrationSource

Migration of Users service.

Types

type Repository

type Repository interface {
	mgclients.Repository

	// Save persists the client account. A non-nil error is returned to indicate
	// operation failure.
	Save(ctx context.Context, client mgclients.Client) (mgclients.Client, error)

	RetrieveByID(ctx context.Context, id string) (mgclients.Client, error)

	UpdateRole(ctx context.Context, client mgclients.Client) (mgclients.Client, error)

	CheckSuperAdmin(ctx context.Context, adminID string) error
}

Repository defines the required dependencies for Client repository.

func NewRepository

func NewRepository(db postgres.Database) Repository

NewRepository instantiates a PostgreSQL implementation of Clients repository.

Jump to

Keyboard shortcuts

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