admin

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(userName, phoneNumber, subID, category string, db *gorm.DB) (reply, frequency string, ok bool)

Add will add a new user

func Help

func Help() string

Help displays the list of admin commands

func Info

func Info(name string, db *gorm.DB) string

Info displays all details on given user

func ListJobs

func ListJobs() string

ListJobs displays a list of all jobs and their status

func ListSubscriptions

func ListSubscriptions(db *gorm.DB) string

ListSubscriptions displays the name and ID of each available subscription type

func ListUsers

func ListUsers(db *gorm.DB) string

ListUsers will display either a list of users or jobs

func Start

func Start(name string, db *gorm.DB) string

Start will set the user to active

func Stop

func Stop(name string, db *gorm.DB) string

Stop will set the user to inactive

func Update

func Update(userName, subID string, db *gorm.DB) string

Update will alter the user's subscription

Types

This section is empty.

Jump to

Keyboard shortcuts

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