Files
openapi-go-answer/docs/InstallationAPI.md
2023-09-26 16:20:01 +08:00

332 lines
8.8 KiB
Markdown

# \InstallationAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**InstallationBaseInfoPost**](InstallationAPI.md#InstallationBaseInfoPost) | **Post** /installation/base-info | init base info
[**InstallationConfigFileCheckPost**](InstallationAPI.md#InstallationConfigFileCheckPost) | **Post** /installation/config-file/check | check config file if exist when installation
[**InstallationDbCheckPost**](InstallationAPI.md#InstallationDbCheckPost) | **Post** /installation/db/check | check database if exist when installation
[**InstallationInitPost**](InstallationAPI.md#InstallationInitPost) | **Post** /installation/init | init environment
[**RootGet**](InstallationAPI.md#RootGet) | **Get** / | if config file not exist try to redirect to install page
## InstallationBaseInfoPost
> HandlerRespBody InstallationBaseInfoPost(ctx).Data(data).Execute()
init base info
### Example
```go
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**](InstallInitBaseInfoReq.md) | InitBaseInfoReq |
### Return type
[**HandlerRespBody**](HandlerRespBody.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## InstallationConfigFileCheckPost
> InstallationConfigFileCheckPost200Response InstallationConfigFileCheckPost(ctx).Execute()
check config file if exist when installation
### Example
```go
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**](InstallationConfigFileCheckPost200Response.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## InstallationDbCheckPost
> InstallationConfigFileCheckPost200Response InstallationDbCheckPost(ctx).Data(data).Execute()
check database if exist when installation
### Example
```go
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**](InstallCheckDatabaseReq.md) | CheckDatabaseReq |
### Return type
[**InstallationConfigFileCheckPost200Response**](InstallationConfigFileCheckPost200Response.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## InstallationInitPost
> HandlerRespBody InstallationInitPost(ctx).Data(data).Execute()
init environment
### Example
```go
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**](InstallCheckDatabaseReq.md) | CheckDatabaseReq |
### Return type
[**HandlerRespBody**](HandlerRespBody.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## RootGet
> RootGet(ctx).Execute()
if config file not exist try to redirect to install page
### Example
```go
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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)