api

package
v0.0.0-...-a311f88 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 8 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 {
	Create(user *model.UserModel) (*model.UserModel, error)
	Find() ([]*model.UserModel, error)
	FindByID(id string) (*model.UserModel, error)
	Update(user *model.UserModel, id string) (*model.UserModel, error)
	Delete(id string) error
}

Repository represent the repositories

func NewCassandraRepository

func NewCassandraRepository(sess *gocql.Session) Repository

NewCassandraRepository will create an object that represent the Repository interface

type Service

type Service interface {
	Create(user *form.UserForm) (*model.UserModel, int, error)
	Find() ([]*model.UserModel, int, error)
	FindByID(id string) (*model.UserModel, int, error)
	Update(user *form.UserForm, id string) (*model.UserModel, int, error)
	Delete(id 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