Documentation ¶
Index ¶
- Variables
- func CheckAppConfigs(w http.ResponseWriter, r *http.Request)
- func CreateService(w http.ResponseWriter, r *http.Request)
- func DeleteCreds(w http.ResponseWriter, r *http.Request)
- func DeleteService(w http.ResponseWriter, r *http.Request)
- func DownloadHostCerts(w http.ResponseWriter, r *http.Request)
- func GetAllServices(w http.ResponseWriter, r *http.Request)
- func GetServiceDetail(w http.ResponseWriter, r *http.Request)
- func GetUpstreamCreds(user, serviceID, serviceType, orgID string) (*models.UpstreamCreds, error)
- func InitServiceStoreMock() *serviceMock
- func InitStore(con *global.State)
- func StoreServiceCredentials(w http.ResponseWriter, r *http.Request)
- func UpdateHTTPProxy(w http.ResponseWriter, r *http.Request)
- func UpdateHostCerts(w http.ResponseWriter, r *http.Request)
- func UpdateSSLCerts(w http.ResponseWriter, r *http.Request)
- func UpdateService(w http.ResponseWriter, r *http.Request)
- func ViewCreds(w http.ResponseWriter, r *http.Request)
- type AllServicesByType
- type ReverseProxyReq
- type ServiceCreds
- type UpdateHostCertsReq
- type UpdateSSLCertsReq
Constants ¶
This section is empty.
Variables ¶
var Store adapter
Store is the package state variable which contains database connections
Functions ¶
func CheckAppConfigs ¶
func CheckAppConfigs(w http.ResponseWriter, r *http.Request)
CheckAppConfigs accepts service config request and validates configuration settigs, basically as integrationID and integrationKey set on client Trasa Connectors (trasa-win, ssh).
func CreateService ¶
func CreateService(w http.ResponseWriter, r *http.Request)
CreateApp creates new App. service here represents login (can be 2fa) endpoints. service details can include service name, passthru options and costum 2FA policies.
func DeleteCreds ¶
func DeleteCreds(w http.ResponseWriter, r *http.Request)
DeleteCreds deletes stored creds from both database and tsxvault.
func DeleteService ¶
func DeleteService(w http.ResponseWriter, r *http.Request)
DeleteService deletes Service from database.
func DownloadHostCerts ¶
func DownloadHostCerts(w http.ResponseWriter, r *http.Request)
func GetAllServices ¶
func GetAllServices(w http.ResponseWriter, r *http.Request)
func GetServiceDetail ¶
func GetServiceDetail(w http.ResponseWriter, r *http.Request)
func GetUpstreamCreds ¶
func GetUpstreamCreds(user, serviceID, serviceType, orgID string) (*models.UpstreamCreds, error)
func InitServiceStoreMock ¶
func InitServiceStoreMock() *serviceMock
func StoreServiceCredentials ¶
func StoreServiceCredentials(w http.ResponseWriter, r *http.Request)
StoreServiceCredentials takes username password from client (trasa-dashboard for now) and stores it in tsxvault. It will also store the event in trasadb. This will come handy for in-app audit logs. storing it separate will also decouples our core dependency in vault
func UpdateHTTPProxy ¶
func UpdateHTTPProxy(w http.ResponseWriter, r *http.Request)
UpdateHTTPProxy updates proxyConfig of http service.
func UpdateHostCerts ¶
func UpdateHostCerts(w http.ResponseWriter, r *http.Request)
func UpdateSSLCerts ¶
func UpdateSSLCerts(w http.ResponseWriter, r *http.Request)
func UpdateService ¶
func UpdateService(w http.ResponseWriter, r *http.Request)
UpdateService should handle Service detail updates.
Types ¶
type AllServicesByType ¶
type ReverseProxyReq ¶
type ReverseProxyReq struct { ServiceID string `json:"serviceID"` Name string `json:"name"` Proxy models.ReverseProxy `json:"proxy"` }