api

package
v0.0.0-...-633cbd0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(c *gin.Context)

Ping will handle the ping endpoint

Types

type Repository

type Repository interface {
	Set(key string, value interface{}, exp time.Duration) error
	SAdd(key string, value ...interface{}) error
	HSet(key, field, value string) (bool, error)
	Get(key string) (string, error)
	GetHSet(key, field string) (string, error)
	GetSAdd(key string) ([]string, error)
	Delete(key string) error
}

Repository represent the repositories

func NewRedisRepository

func NewRedisRepository(Client redis.Cmdable) Repository

NewRedisRepository will create an object that represent the Repository interface

type Service

type Service interface {
	Set(key string, value interface{}, exp time.Duration) (int, error)
	SAdd(key string, value ...interface{}) (int, error)
	HSet(key, field, value string) (bool, int, error)
	Get(key string) (string, int, error)
	GetSAdd(key string) ([]string, int, error)
	GetHSet(key, field string) (string, int, error)
	Delete(key string) (int, error)
}

Service represent the services

func NewService

func NewService(log *logrus.Entry, r Repository) Service

NewService will create an object that represent the Service interface

Directories

Path Synopsis
api_struct
delivery

Jump to

Keyboard shortcuts

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