abuse

package
v0.0.0-...-8ac8335 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAbuseRepo

func NewAbuseRepo(db *sql.DB) *abuseRepo

NewAbuseRepo returns a struct that implements abuse repo with a database connection

func NewRouter

func NewRouter(db *sql.DB) *chi.Mux

NewRouter returns a mux router

Types

type Abuse

type Abuse struct {
	Id int `json:"id,omitempty"`
	// Name is the abuse address
	Name    string `json:"name"`
	Created string `json:"created,omitempty"`
}

Abuse represents an abuse address

type AbuseRepo

type AbuseRepo interface {
	ListAbuse() ([]*Abuse, error)
	GetAbuse(id int) (*Abuse, error)
	DeleteAbuse(id int) error
	InsertAbuse(*Abuse) error
}

AbuseRepo is the interface to implements in order to manage abuse address

Jump to

Keyboard shortcuts

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