server

package
v0.0.0-...-602e55c Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package server contains a Gin API as well as specifications for the objects it is intended to send and receive. The struct for the server includes access to users and domains. All POST requests need a valid username and password combo.

Index

Constants

View Source
const (
	INVALID_JSON     = "Invalid JSON body"
	INVALID_PASSWORD = "Invalid username or password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUserObj

type AddUserObj struct {
	Username    string
	Password    string
	NewUsername string
	NewPassword string
}

type AuthObj

type AuthObj struct {
	Username string
	Password string
}

type DomainsObj

type DomainsObj struct {
	Username string
	Password string
	Websites []website.WebsiteInfo
}

type EditUserObj

type EditUserObj struct {
	Username    string
	Password    string
	NewPassword string
}

type Server

type Server struct {
	Address   string
	Engine    *gin.Engine
	Websites  *monitoring.Orchestrator
	Users     *user.Users
	WaitGroup *sync.WaitGroup
}

func (*Server) Start

func (s *Server) Start()

type SuccessObj

type SuccessObj struct {
	Succeeded []string
	Failed    []string
}

Jump to

Keyboard shortcuts

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