8.8 KiB
\InstallationAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| InstallationBaseInfoPost | Post /installation/base-info | init base info |
| InstallationConfigFileCheckPost | Post /installation/config-file/check | check config file if exist when installation |
| InstallationDbCheckPost | Post /installation/db/check | check database if exist when installation |
| InstallationInitPost | Post /installation/init | init environment |
| RootGet | Get / | if config file not exist try to redirect to install page |
InstallationBaseInfoPost
HandlerRespBody InstallationBaseInfoPost(ctx).Data(data).Execute()
init base info
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewInstallInitBaseInfoReq("ContactEmail_example", "Email_example", "Lang_example", "Name_example", "Password_example", "SiteName_example", "SiteUrl_example") // InstallInitBaseInfoReq | InitBaseInfoReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstallationAPI.InstallationBaseInfoPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstallationAPI.InstallationBaseInfoPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InstallationBaseInfoPost`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `InstallationAPI.InstallationBaseInfoPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiInstallationBaseInfoPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | InstallInitBaseInfoReq | InitBaseInfoReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstallationConfigFileCheckPost
InstallationConfigFileCheckPost200Response InstallationConfigFileCheckPost(ctx).Execute()
check config file if exist when installation
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstallationAPI.InstallationConfigFileCheckPost(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstallationAPI.InstallationConfigFileCheckPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InstallationConfigFileCheckPost`: InstallationConfigFileCheckPost200Response
fmt.Fprintf(os.Stdout, "Response from `InstallationAPI.InstallationConfigFileCheckPost`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiInstallationConfigFileCheckPostRequest struct via the builder pattern
Return type
InstallationConfigFileCheckPost200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstallationDbCheckPost
InstallationConfigFileCheckPost200Response InstallationDbCheckPost(ctx).Data(data).Execute()
check database if exist when installation
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewInstallCheckDatabaseReq("DbType_example") // InstallCheckDatabaseReq | CheckDatabaseReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstallationAPI.InstallationDbCheckPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstallationAPI.InstallationDbCheckPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InstallationDbCheckPost`: InstallationConfigFileCheckPost200Response
fmt.Fprintf(os.Stdout, "Response from `InstallationAPI.InstallationDbCheckPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiInstallationDbCheckPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | InstallCheckDatabaseReq | CheckDatabaseReq |
Return type
InstallationConfigFileCheckPost200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstallationInitPost
HandlerRespBody InstallationInitPost(ctx).Data(data).Execute()
init environment
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewInstallCheckDatabaseReq("DbType_example") // InstallCheckDatabaseReq | CheckDatabaseReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstallationAPI.InstallationInitPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstallationAPI.InstallationInitPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InstallationInitPost`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `InstallationAPI.InstallationInitPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiInstallationInitPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | InstallCheckDatabaseReq | CheckDatabaseReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RootGet
RootGet(ctx).Execute()
if config file not exist try to redirect to install page
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InstallationAPI.RootGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstallationAPI.RootGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiRootGetRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]