portal

package
v0.4.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// Code identifies the error and enables an easier client-side error handling.
	Code int `json:"code"`
	// Message describes the error in English. Typically it is set to
	// `err.Error()`. This field is required.
	Message string `json:"message"`
}

Error is a type that is encoded as JSON and returned in an API response in the event of an error.

func (Error) Error

func (err Error) Error() string

Error implements the error interface for the Error type. It returns only the Message field.

type Portal

type Portal struct {
	// contains filtered or unexported fields
}

Portal contains the information related to the server.

func New

func New(config *persist.SatdConfig, db *sql.DB, m modules.Manager, p modules.Provider, dir string) (*Portal, error)

New returns an initialized portal server.

func (*Portal) Alerts

func (p *Portal) Alerts() (crit, err, warn, info []modules.Alert)

Alerts implements the modules.Alerter interface for the portal.

func (*Portal) Close

func (p *Portal) Close() error

Close shuts down the portal.

func (*Portal) GetCredits

func (p *Portal) GetCredits() modules.CreditData

GetCredits retrieves the credit data.

func (*Portal) SetCredits

func (p *Portal) SetCredits(c modules.CreditData)

SetCredits updates the credit data.

Jump to

Keyboard shortcuts

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