Documentation ¶
Index ¶
- func CheckHostname(api *Api, template string)
- func CheckPort(api *Api, template string)
- func CheckSettings(api *Api)
- func CheckTitle(api *Api, template string)
- func CheckVersion(api *Api, template string)
- func GetFullPath(api *Api) string
- func GetHostname(api *Api) string
- func GetPort(api *Api) string
- func GetRnP(api *Api) (string, *mux.Router)
- func GetRouter(api *Api) *mux.Router
- func GetTitle(api *Api) string
- func GetVersion(api *Api) string
- func InitDefaultRouter(api *Api)
- func RunDefaultClient(api *Api)
- func SetHostname(api *Api, hostname string)
- func SetPort(api *Api, port string)
- func SetTitle(api *Api, title string)
- func SetVersion(api *Api, version string)
- func ShowHostname(api *Api)
- func ShowPort(api *Api)
- func ShowTitle(api *Api)
- func ShowVersion(api *Api)
- type Api
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHostname ¶
CheckHostname checks if the hostname is set from .env
func CheckSettings ¶
func CheckSettings(api *Api)
CheckSettings checks if the settings are set from .env
func CheckTitle ¶
CheckTitle checks if the title is set from .env
func CheckVersion ¶
CheckVersion checks if the version is set from .env
func RunDefaultClient ¶
func RunDefaultClient(api *Api)
RunDefaultClient is a function that serves the Api on the default port
func SetHostname ¶
SetHostname sets the hostname of the Api
Types ¶
type Api ¶
Api is the container for all app properties
func DefaultAPIClient ¶
func DefaultAPIClient() *Api
DefaultAPIClient is the default client for the API without config
type Settings ¶
type Settings struct { // Title of the api instance Title string // Hostname of the api server (default: localhost) Hostname string // Port that the server will listen on Port string // Version of the Api Version string }
Settings struct holds settings for Api
func DefaultTemplate ¶
func DefaultTemplate() *Settings
DefaultTemplate default template of the Api settings
Click to show internal directories.
Click to hide internal directories.