Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseSettings

type DatabaseSettings struct {
	// Server is the address of the SQL server is hosted.
	Server string `json:"server"`
	// Username is the username to authenticate to the server with.
	Username string `json:"username"`
	// Password is the password to authenticate to the server with.
	Password string `json:"password"`
	// Database is the name of the SQL database to connect to.
	Database string `json:"database"`
}

DatabaseSettings are app-level settings configuring how to connect to the SQL database.

func Get

Get returns the current settings. This may hit an outdated cache.

func GetUncached

func GetUncached(c context.Context) (*DatabaseSettings, error)

GetUncached returns the latest settings, bypassing the cache.

func New

New returns a new instance of DatabaseSettings.

func (*DatabaseSettings) Actions

Actions is additional list of actions to present on the page.

func (*DatabaseSettings) Fields

Fields returns the form fields for configuring these settings.

func (*DatabaseSettings) Overview

Overview returns an overview of these settings.

func (*DatabaseSettings) ReadSettings

func (*DatabaseSettings) ReadSettings(c context.Context) (map[string]string, error)

ReadSettings returns settings for display.

func (*DatabaseSettings) Title

Title returns the title of this settings page.

func (*DatabaseSettings) WriteSettings

func (*DatabaseSettings) WriteSettings(c context.Context, values map[string]string, who, why string) error

WriteSettings commits any changes to the settings.

Source Files