repository

package
v0.0.0-...-21f8c35 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package repository contains the implementation of data access methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *gorm.DB, cache *redis.Client) interfaces.RepoInterface

New function creates a new Repo instance

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo struct

func (*Repo) DeleteClient

func (repo *Repo) DeleteClient(name string) error

DeleteClient function deletes an existing client

func (*Repo) GetClient

func (repo *Repo) GetClient(name string) (models.Client, error)

GetClient function returns the client instance searched by name

func (*Repo) RegisterClient

func (repo *Repo) RegisterClient(client models.Client) (models.Client, error)

RegisterClient function enters a new client into the fluxy database

func (*Repo) UpdateClient

func (repo *Repo) UpdateClient(client models.Client) error

UpdateClient function updates the client

Jump to

Keyboard shortcuts

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