All URIs are relative to https://api.beget.com
Method | HTTP request | Description |
---|---|---|
AuthServiceAuth | Post /v1/auth | |
AuthServiceLogout | Post /v1/auth/logout | |
AuthServiceRefreshToken | Post /v1/auth/refresh | |
AuthServiceSwitchUser | Post /v1/auth/switch |
AuthAuthResponse AuthServiceAuth(ctx).AuthAuthRequest(authAuthRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
authAuthRequest := *openapiclient.NewAuthAuthRequest() // AuthAuthRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthServiceApi.AuthServiceAuth(context.Background()).AuthAuthRequest(authAuthRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthServiceApi.AuthServiceAuth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AuthServiceAuth`: AuthAuthResponse
fmt.Fprintf(os.Stdout, "Response from `AuthServiceApi.AuthServiceAuth`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAuthServiceAuthRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authAuthRequest | AuthAuthRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} AuthServiceLogout(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthServiceApi.AuthServiceLogout(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthServiceApi.AuthServiceLogout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AuthServiceLogout`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `AuthServiceApi.AuthServiceLogout`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiAuthServiceLogoutRequest struct via the builder pattern
map[string]interface{}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthRefreshTokenResponse AuthServiceRefreshToken(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthServiceApi.AuthServiceRefreshToken(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthServiceApi.AuthServiceRefreshToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AuthServiceRefreshToken`: AuthRefreshTokenResponse
fmt.Fprintf(os.Stdout, "Response from `AuthServiceApi.AuthServiceRefreshToken`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiAuthServiceRefreshTokenRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthSwitchUserResponse AuthServiceSwitchUser(ctx).AuthSwitchUserRequest(authSwitchUserRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
authSwitchUserRequest := *openapiclient.NewAuthSwitchUserRequest() // AuthSwitchUserRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthServiceApi.AuthServiceSwitchUser(context.Background()).AuthSwitchUserRequest(authSwitchUserRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthServiceApi.AuthServiceSwitchUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AuthServiceSwitchUser`: AuthSwitchUserResponse
fmt.Fprintf(os.Stdout, "Response from `AuthServiceApi.AuthServiceSwitchUser`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAuthServiceSwitchUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authSwitchUserRequest | AuthSwitchUserRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]