Documentation
¶
Overview ¶
Package neon provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*http.Request, error)
- func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateProjectBranchDatabaseRequest(server string, projectId string, branchId string, ...) (*http.Request, error)
- func NewCreateProjectBranchDatabaseRequestWithBody(server string, projectId string, branchId string, contentType string, ...) (*http.Request, error)
- func NewCreateProjectBranchRequest(server string, projectId string, body CreateProjectBranchJSONRequestBody) (*http.Request, error)
- func NewCreateProjectBranchRequestWithBody(server string, projectId string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateProjectBranchRoleRequest(server string, projectId string, branchId string, ...) (*http.Request, error)
- func NewCreateProjectBranchRoleRequestWithBody(server string, projectId string, branchId string, contentType string, ...) (*http.Request, error)
- func NewCreateProjectEndpointRequest(server string, projectId string, body CreateProjectEndpointJSONRequestBody) (*http.Request, error)
- func NewCreateProjectEndpointRequestWithBody(server string, projectId string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error)
- func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string) (*http.Request, error)
- func NewDeleteProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewDeleteProjectBranchRoleRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
- func NewDeleteProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
- func NewDeleteProjectRequest(server string, projectId string) (*http.Request, error)
- func NewGetProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string) (*http.Request, error)
- func NewGetProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewGetProjectBranchRolePasswordRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
- func NewGetProjectBranchRoleRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
- func NewGetProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
- func NewGetProjectOperationRequest(server string, projectId string, operationId openapi_types.UUID) (*http.Request, error)
- func NewGetProjectRequest(server string, projectId string) (*http.Request, error)
- func NewListApiKeysRequest(server string) (*http.Request, error)
- func NewListProjectBranchDatabasesRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewListProjectBranchEndpointsRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewListProjectBranchRolesRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewListProjectBranchesRequest(server string, projectId string) (*http.Request, error)
- func NewListProjectEndpointsRequest(server string, projectId string) (*http.Request, error)
- func NewListProjectOperationsRequest(server string, projectId string, params *ListProjectOperationsParams) (*http.Request, error)
- func NewListProjectsRequest(server string, params *ListProjectsParams) (*http.Request, error)
- func NewResetProjectBranchRolePasswordRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
- func NewRevokeApiKeyRequest(server string, keyId int64) (*http.Request, error)
- func NewSetPrimaryProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
- func NewStartProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
- func NewSuspendProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
- func NewUpdateProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string, ...) (*http.Request, error)
- func NewUpdateProjectBranchDatabaseRequestWithBody(server string, projectId string, branchId string, databaseName string, ...) (*http.Request, error)
- func NewUpdateProjectBranchRequest(server string, projectId string, branchId string, ...) (*http.Request, error)
- func NewUpdateProjectBranchRequestWithBody(server string, projectId string, branchId string, contentType string, ...) (*http.Request, error)
- func NewUpdateProjectEndpointRequest(server string, projectId string, endpointId string, ...) (*http.Request, error)
- func NewUpdateProjectEndpointRequestWithBody(server string, projectId string, endpointId string, contentType string, ...) (*http.Request, error)
- func NewUpdateProjectRequest(server string, projectId string, body UpdateProjectJSONRequestBody) (*http.Request, error)
- func NewUpdateProjectRequestWithBody(server string, projectId string, contentType string, body io.Reader) (*http.Request, error)
- type ApiKeyCreateRequest
- type ApiKeyCreateResponse
- type ApiKeyRevokeResponse
- type ApiKeysListResponseItem
- type BillingSubscriptionType
- type Branch
- type BranchCreateRequest
- type BranchCreateRequestEndpointOptions
- type BranchOperations
- type BranchResponse
- type BranchState
- type BranchUpdateRequest
- type BranchesResponse
- type Client
- func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranch(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranchDatabase(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranchDatabaseWithBody(ctx context.Context, projectId string, branchId string, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranchRole(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranchRoleWithBody(ctx context.Context, projectId string, branchId string, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateProjectBranchWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateProjectEndpoint(ctx context.Context, projectId string, ...) (*http.Response, error)
- func (c *Client) CreateProjectEndpointWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteProject(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteProjectBranch(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) DeleteProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*http.Response, error)
- func (c *Client) DeleteProjectBranchRole(ctx context.Context, projectId string, branchId string, roleName string, ...) (*http.Response, error)
- func (c *Client) DeleteProjectEndpoint(ctx context.Context, projectId string, endpointId string, ...) (*http.Response, error)
- func (c *Client) GetProject(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetProjectBranch(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) GetProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*http.Response, error)
- func (c *Client) GetProjectBranchRole(ctx context.Context, projectId string, branchId string, roleName string, ...) (*http.Response, error)
- func (c *Client) GetProjectBranchRolePassword(ctx context.Context, projectId string, branchId string, roleName string, ...) (*http.Response, error)
- func (c *Client) GetProjectEndpoint(ctx context.Context, projectId string, endpointId string, ...) (*http.Response, error)
- func (c *Client) GetProjectOperation(ctx context.Context, projectId string, operationId openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListProjectBranchDatabases(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) ListProjectBranchEndpoints(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) ListProjectBranchRoles(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) ListProjectBranches(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListProjectEndpoints(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListProjectOperations(ctx context.Context, projectId string, params *ListProjectOperationsParams, ...) (*http.Response, error)
- func (c *Client) ListProjects(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ResetProjectBranchRolePassword(ctx context.Context, projectId string, branchId string, roleName string, ...) (*http.Response, error)
- func (c *Client) RevokeApiKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SetPrimaryProjectBranch(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) StartProjectEndpoint(ctx context.Context, projectId string, endpointId string, ...) (*http.Response, error)
- func (c *Client) SuspendProjectEndpoint(ctx context.Context, projectId string, endpointId string, ...) (*http.Response, error)
- func (c *Client) UpdateProject(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateProjectBranch(ctx context.Context, projectId string, branchId string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectBranchDatabaseWithBody(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectBranchWithBody(ctx context.Context, projectId string, branchId string, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectEndpoint(ctx context.Context, projectId string, endpointId string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectEndpointWithBody(ctx context.Context, projectId string, endpointId string, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateProjectWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateApiKeyResponse, error)
- func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, ...) (*CreateApiKeyResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, ...) (*CreateProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, ...) (*CreateProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchRoleWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, ...) (*CreateProjectBranchRoleResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, ...) (*CreateProjectBranchRoleResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*CreateProjectBranchResponse, error)
- func (c *ClientWithResponses) CreateProjectBranchWithResponse(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, ...) (*CreateProjectBranchResponse, error)
- func (c *ClientWithResponses) CreateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*CreateProjectEndpointResponse, error)
- func (c *ClientWithResponses) CreateProjectEndpointWithResponse(ctx context.Context, projectId string, ...) (*CreateProjectEndpointResponse, error)
- func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateProjectResponse, error)
- func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, ...) (*CreateProjectResponse, error)
- func (c *ClientWithResponses) DeleteProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*DeleteProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) DeleteProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, ...) (*DeleteProjectBranchRoleResponse, error)
- func (c *ClientWithResponses) DeleteProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, ...) (*DeleteProjectBranchResponse, error)
- func (c *ClientWithResponses) DeleteProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, ...) (*DeleteProjectEndpointResponse, error)
- func (c *ClientWithResponses) DeleteProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error)
- func (c *ClientWithResponses) GetProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*GetProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) GetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, ...) (*GetProjectBranchRolePasswordResponse, error)
- func (c *ClientWithResponses) GetProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, ...) (*GetProjectBranchRoleResponse, error)
- func (c *ClientWithResponses) GetProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, ...) (*GetProjectBranchResponse, error)
- func (c *ClientWithResponses) GetProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, ...) (*GetProjectEndpointResponse, error)
- func (c *ClientWithResponses) GetProjectOperationWithResponse(ctx context.Context, projectId string, operationId openapi_types.UUID, ...) (*GetProjectOperationResponse, error)
- func (c *ClientWithResponses) GetProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*GetProjectResponse, error)
- func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)
- func (c *ClientWithResponses) ListProjectBranchDatabasesWithResponse(ctx context.Context, projectId string, branchId string, ...) (*ListProjectBranchDatabasesResponse, error)
- func (c *ClientWithResponses) ListProjectBranchEndpointsWithResponse(ctx context.Context, projectId string, branchId string, ...) (*ListProjectBranchEndpointsResponse, error)
- func (c *ClientWithResponses) ListProjectBranchRolesWithResponse(ctx context.Context, projectId string, branchId string, ...) (*ListProjectBranchRolesResponse, error)
- func (c *ClientWithResponses) ListProjectBranchesWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectBranchesResponse, error)
- func (c *ClientWithResponses) ListProjectEndpointsWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectEndpointsResponse, error)
- func (c *ClientWithResponses) ListProjectOperationsWithResponse(ctx context.Context, projectId string, params *ListProjectOperationsParams, ...) (*ListProjectOperationsResponse, error)
- func (c *ClientWithResponses) ListProjectsWithResponse(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error)
- func (c *ClientWithResponses) ResetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, ...) (*ResetProjectBranchRolePasswordResponse, error)
- func (c *ClientWithResponses) RevokeApiKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error)
- func (c *ClientWithResponses) SetPrimaryProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, ...) (*SetPrimaryProjectBranchResponse, error)
- func (c *ClientWithResponses) StartProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, ...) (*StartProjectEndpointResponse, error)
- func (c *ClientWithResponses) SuspendProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, ...) (*SuspendProjectEndpointResponse, error)
- func (c *ClientWithResponses) UpdateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*UpdateProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) UpdateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, ...) (*UpdateProjectBranchDatabaseResponse, error)
- func (c *ClientWithResponses) UpdateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, ...) (*UpdateProjectBranchResponse, error)
- func (c *ClientWithResponses) UpdateProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, ...) (*UpdateProjectBranchResponse, error)
- func (c *ClientWithResponses) UpdateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, endpointId string, contentType string, ...) (*UpdateProjectEndpointResponse, error)
- func (c *ClientWithResponses) UpdateProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, ...) (*UpdateProjectEndpointResponse, error)
- func (c *ClientWithResponses) UpdateProjectWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, ...) (*UpdateProjectResponse, error)
- func (c *ClientWithResponses) UpdateProjectWithResponse(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, ...) (*UpdateProjectResponse, error)
- type ClientWithResponsesInterface
- type ComputeUnit
- type ConnectionDetails
- type ConnectionParameters
- type ConnectionURIsOptionalResponse
- type ConnectionURIsResponse
- type CreateApiKeyJSONRequestBody
- type CreateApiKeyResponse
- type CreateProjectBranchDatabaseJSONRequestBody
- type CreateProjectBranchDatabaseResponse
- type CreateProjectBranchJSONRequestBody
- type CreateProjectBranchResponse
- type CreateProjectBranchRoleJSONRequestBody
- type CreateProjectBranchRoleResponse
- type CreateProjectEndpointJSONRequestBody
- type CreateProjectEndpointResponse
- type CreateProjectJSONRequestBody
- type CreateProjectResponse
- type CreatedBranch
- type CreatedProject
- type Database
- type DatabaseCreateRequest
- type DatabaseOperations
- type DatabaseResponse
- type DatabaseUpdateRequest
- type DatabasesResponse
- type DefaultEndpointSettings
- type DeleteProjectBranchDatabaseResponse
- type DeleteProjectBranchResponse
- type DeleteProjectBranchRoleResponse
- type DeleteProjectEndpointResponse
- type DeleteProjectResponse
- type Endpoint
- type EndpointCreateRequest
- type EndpointOperations
- type EndpointPoolerMode
- type EndpointResponse
- type EndpointSettingsData
- type EndpointState
- type EndpointType
- type EndpointUpdateRequest
- type EndpointsResponse
- type ErrorCode
- type GeneralError
- type GeneralErrorResp
- type GetProjectBranchDatabaseResponse
- type GetProjectBranchResponse
- type GetProjectBranchRolePasswordResponse
- type GetProjectBranchRoleResponse
- type GetProjectEndpointResponse
- type GetProjectOperationResponse
- type GetProjectResponse
- type HttpRequestDoer
- type ListApiKeysResponse
- type ListOperations
- type ListProjectBranchDatabasesResponse
- type ListProjectBranchEndpointsResponse
- type ListProjectBranchRolesResponse
- type ListProjectBranchesResponse
- type ListProjectEndpointsResponse
- type ListProjectOperationsParams
- type ListProjectOperationsResponse
- type ListProjectsParams
- type ListProjectsResponse
- type Operation
- type OperationAction
- type OperationResponse
- type OperationStatus
- type OperationsResponse
- type Pagination
- type PaginationResponse
- type PgSettingsData
- type PgVersion
- type Project
- type ProjectCreateRequest
- type ProjectListItem
- type ProjectOperations
- type ProjectOwnerData
- type ProjectQuota
- type ProjectResponse
- type ProjectSettingsData
- type ProjectUpdateRequest
- type ProjectsResponse
- type Provisioner
- type RequestEditorFn
- type ResetProjectBranchRolePasswordResponse
- type RevokeApiKeyResponse
- type Role
- type RoleCreateRequest
- type RoleOperations
- type RolePasswordResponse
- type RoleResponse
- type RolesResponse
- type SetPrimaryProjectBranchResponse
- type StartProjectEndpointResponse
- type SuspendProjectEndpointResponse
- type SuspendTimeoutSeconds
- type UpdateProjectBranchDatabaseJSONRequestBody
- type UpdateProjectBranchDatabaseResponse
- type UpdateProjectBranchJSONRequestBody
- type UpdateProjectBranchResponse
- type UpdateProjectEndpointJSONRequestBody
- type UpdateProjectEndpointResponse
- type UpdateProjectJSONRequestBody
- type UpdateProjectResponse
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateApiKeyRequest ¶
func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*http.Request, error)
NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body
func NewCreateApiKeyRequestWithBody ¶
func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateApiKeyRequestWithBody generates requests for CreateApiKey with any type of body
func NewCreateProjectBranchDatabaseRequest ¶
func NewCreateProjectBranchDatabaseRequest(server string, projectId string, branchId string, body CreateProjectBranchDatabaseJSONRequestBody) (*http.Request, error)
NewCreateProjectBranchDatabaseRequest calls the generic CreateProjectBranchDatabase builder with application/json body
func NewCreateProjectBranchDatabaseRequestWithBody ¶
func NewCreateProjectBranchDatabaseRequestWithBody(server string, projectId string, branchId string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProjectBranchDatabaseRequestWithBody generates requests for CreateProjectBranchDatabase with any type of body
func NewCreateProjectBranchRequest ¶
func NewCreateProjectBranchRequest(server string, projectId string, body CreateProjectBranchJSONRequestBody) (*http.Request, error)
NewCreateProjectBranchRequest calls the generic CreateProjectBranch builder with application/json body
func NewCreateProjectBranchRequestWithBody ¶
func NewCreateProjectBranchRequestWithBody(server string, projectId string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProjectBranchRequestWithBody generates requests for CreateProjectBranch with any type of body
func NewCreateProjectBranchRoleRequest ¶
func NewCreateProjectBranchRoleRequest(server string, projectId string, branchId string, body CreateProjectBranchRoleJSONRequestBody) (*http.Request, error)
NewCreateProjectBranchRoleRequest calls the generic CreateProjectBranchRole builder with application/json body
func NewCreateProjectBranchRoleRequestWithBody ¶
func NewCreateProjectBranchRoleRequestWithBody(server string, projectId string, branchId string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProjectBranchRoleRequestWithBody generates requests for CreateProjectBranchRole with any type of body
func NewCreateProjectEndpointRequest ¶
func NewCreateProjectEndpointRequest(server string, projectId string, body CreateProjectEndpointJSONRequestBody) (*http.Request, error)
NewCreateProjectEndpointRequest calls the generic CreateProjectEndpoint builder with application/json body
func NewCreateProjectEndpointRequestWithBody ¶
func NewCreateProjectEndpointRequestWithBody(server string, projectId string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProjectEndpointRequestWithBody generates requests for CreateProjectEndpoint with any type of body
func NewCreateProjectRequest ¶
func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error)
NewCreateProjectRequest calls the generic CreateProject builder with application/json body
func NewCreateProjectRequestWithBody ¶
func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body
func NewDeleteProjectBranchDatabaseRequest ¶
func NewDeleteProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string) (*http.Request, error)
NewDeleteProjectBranchDatabaseRequest generates requests for DeleteProjectBranchDatabase
func NewDeleteProjectBranchRequest ¶
func NewDeleteProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
NewDeleteProjectBranchRequest generates requests for DeleteProjectBranch
func NewDeleteProjectBranchRoleRequest ¶
func NewDeleteProjectBranchRoleRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
NewDeleteProjectBranchRoleRequest generates requests for DeleteProjectBranchRole
func NewDeleteProjectEndpointRequest ¶
func NewDeleteProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
NewDeleteProjectEndpointRequest generates requests for DeleteProjectEndpoint
func NewDeleteProjectRequest ¶
NewDeleteProjectRequest generates requests for DeleteProject
func NewGetProjectBranchDatabaseRequest ¶
func NewGetProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string) (*http.Request, error)
NewGetProjectBranchDatabaseRequest generates requests for GetProjectBranchDatabase
func NewGetProjectBranchRequest ¶
func NewGetProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
NewGetProjectBranchRequest generates requests for GetProjectBranch
func NewGetProjectBranchRolePasswordRequest ¶
func NewGetProjectBranchRolePasswordRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
NewGetProjectBranchRolePasswordRequest generates requests for GetProjectBranchRolePassword
func NewGetProjectBranchRoleRequest ¶
func NewGetProjectBranchRoleRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
NewGetProjectBranchRoleRequest generates requests for GetProjectBranchRole
func NewGetProjectEndpointRequest ¶
func NewGetProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
NewGetProjectEndpointRequest generates requests for GetProjectEndpoint
func NewGetProjectOperationRequest ¶
func NewGetProjectOperationRequest(server string, projectId string, operationId openapi_types.UUID) (*http.Request, error)
NewGetProjectOperationRequest generates requests for GetProjectOperation
func NewGetProjectRequest ¶
NewGetProjectRequest generates requests for GetProject
func NewListApiKeysRequest ¶
NewListApiKeysRequest generates requests for ListApiKeys
func NewListProjectBranchDatabasesRequest ¶
func NewListProjectBranchDatabasesRequest(server string, projectId string, branchId string) (*http.Request, error)
NewListProjectBranchDatabasesRequest generates requests for ListProjectBranchDatabases
func NewListProjectBranchEndpointsRequest ¶
func NewListProjectBranchEndpointsRequest(server string, projectId string, branchId string) (*http.Request, error)
NewListProjectBranchEndpointsRequest generates requests for ListProjectBranchEndpoints
func NewListProjectBranchRolesRequest ¶
func NewListProjectBranchRolesRequest(server string, projectId string, branchId string) (*http.Request, error)
NewListProjectBranchRolesRequest generates requests for ListProjectBranchRoles
func NewListProjectBranchesRequest ¶
NewListProjectBranchesRequest generates requests for ListProjectBranches
func NewListProjectEndpointsRequest ¶
NewListProjectEndpointsRequest generates requests for ListProjectEndpoints
func NewListProjectOperationsRequest ¶
func NewListProjectOperationsRequest(server string, projectId string, params *ListProjectOperationsParams) (*http.Request, error)
NewListProjectOperationsRequest generates requests for ListProjectOperations
func NewListProjectsRequest ¶
func NewListProjectsRequest(server string, params *ListProjectsParams) (*http.Request, error)
NewListProjectsRequest generates requests for ListProjects
func NewResetProjectBranchRolePasswordRequest ¶
func NewResetProjectBranchRolePasswordRequest(server string, projectId string, branchId string, roleName string) (*http.Request, error)
NewResetProjectBranchRolePasswordRequest generates requests for ResetProjectBranchRolePassword
func NewRevokeApiKeyRequest ¶
NewRevokeApiKeyRequest generates requests for RevokeApiKey
func NewSetPrimaryProjectBranchRequest ¶
func NewSetPrimaryProjectBranchRequest(server string, projectId string, branchId string) (*http.Request, error)
NewSetPrimaryProjectBranchRequest generates requests for SetPrimaryProjectBranch
func NewStartProjectEndpointRequest ¶
func NewStartProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
NewStartProjectEndpointRequest generates requests for StartProjectEndpoint
func NewSuspendProjectEndpointRequest ¶
func NewSuspendProjectEndpointRequest(server string, projectId string, endpointId string) (*http.Request, error)
NewSuspendProjectEndpointRequest generates requests for SuspendProjectEndpoint
func NewUpdateProjectBranchDatabaseRequest ¶
func NewUpdateProjectBranchDatabaseRequest(server string, projectId string, branchId string, databaseName string, body UpdateProjectBranchDatabaseJSONRequestBody) (*http.Request, error)
NewUpdateProjectBranchDatabaseRequest calls the generic UpdateProjectBranchDatabase builder with application/json body
func NewUpdateProjectBranchDatabaseRequestWithBody ¶
func NewUpdateProjectBranchDatabaseRequestWithBody(server string, projectId string, branchId string, databaseName string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateProjectBranchDatabaseRequestWithBody generates requests for UpdateProjectBranchDatabase with any type of body
func NewUpdateProjectBranchRequest ¶
func NewUpdateProjectBranchRequest(server string, projectId string, branchId string, body UpdateProjectBranchJSONRequestBody) (*http.Request, error)
NewUpdateProjectBranchRequest calls the generic UpdateProjectBranch builder with application/json body
func NewUpdateProjectBranchRequestWithBody ¶
func NewUpdateProjectBranchRequestWithBody(server string, projectId string, branchId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateProjectBranchRequestWithBody generates requests for UpdateProjectBranch with any type of body
func NewUpdateProjectEndpointRequest ¶
func NewUpdateProjectEndpointRequest(server string, projectId string, endpointId string, body UpdateProjectEndpointJSONRequestBody) (*http.Request, error)
NewUpdateProjectEndpointRequest calls the generic UpdateProjectEndpoint builder with application/json body
func NewUpdateProjectEndpointRequestWithBody ¶
func NewUpdateProjectEndpointRequestWithBody(server string, projectId string, endpointId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateProjectEndpointRequestWithBody generates requests for UpdateProjectEndpoint with any type of body
func NewUpdateProjectRequest ¶
func NewUpdateProjectRequest(server string, projectId string, body UpdateProjectJSONRequestBody) (*http.Request, error)
NewUpdateProjectRequest calls the generic UpdateProject builder with application/json body
Types ¶
type ApiKeyCreateRequest ¶
type ApiKeyCreateRequest struct { // KeyName A user-specified API key name. This value is required when creating an API key. KeyName string `json:"key_name"` }
ApiKeyCreateRequest defines model for ApiKeyCreateRequest.
type ApiKeyCreateResponse ¶
type ApiKeyCreateResponse struct { // Id The API key ID Id int64 `json:"id"` // Key The generated 64-bit token required to access the Neon API Key string `json:"key"` }
ApiKeyCreateResponse defines model for ApiKeyCreateResponse.
type ApiKeyRevokeResponse ¶
type ApiKeyRevokeResponse struct { // Id The API key ID Id int64 `json:"id"` // LastUsedAt A timestamp indicating when the API was last used LastUsedAt *time.Time `json:"last_used_at"` // LastUsedFromAddr The IP address from which the API key was last used LastUsedFromAddr string `json:"last_used_from_addr"` // Name The user-specified API key name Name string `json:"name"` // Revoked A `true` or `false` value indicating whether the API key is revoked Revoked bool `json:"revoked"` }
ApiKeyRevokeResponse defines model for ApiKeyRevokeResponse.
type ApiKeysListResponseItem ¶
type ApiKeysListResponseItem struct { // CreatedAt A timestamp indicating when the API key was created CreatedAt time.Time `json:"created_at"` // Id The API key ID Id int64 `json:"id"` // LastUsedAt A timestamp indicating when the API was last used LastUsedAt *time.Time `json:"last_used_at"` // LastUsedFromAddr The IP address from which the API key was last used LastUsedFromAddr string `json:"last_used_from_addr"` // Name The user-specified API key name Name string `json:"name"` }
ApiKeysListResponseItem defines model for ApiKeysListResponseItem.
type BillingSubscriptionType ¶
type BillingSubscriptionType string
BillingSubscriptionType Type of subscription to Neon Cloud. Notice that for users without billing account this will be "UNKNOWN"
const ( Enterprise BillingSubscriptionType = "enterprise" Free BillingSubscriptionType = "free" PlatformPartnership BillingSubscriptionType = "platform_partnership" Pro BillingSubscriptionType = "pro" UNKNOWN BillingSubscriptionType = "UNKNOWN" )
Defines values for BillingSubscriptionType.
type Branch ¶
type Branch struct { ActiveTimeSeconds int64 `json:"active_time_seconds"` ComputeTimeSeconds int64 `json:"compute_time_seconds"` // CpuUsedSec CPU seconds used by all the endpoints of the branch, including deleted ones. // This value is reset at the beginning of each billing period. // Examples: // 1. A branch that uses 1 CPU for 1 second is equal to `cpu_used_sec=1`. // 2. A branch that uses 2 CPUs simultaneously for 1 second is equal to `cpu_used_sec=2`. // Deprecated: CpuUsedSec int64 `json:"cpu_used_sec"` // CreatedAt A timestamp indicating when the branch was created CreatedAt time.Time `json:"created_at"` // CreationSource The branch creation source CreationSource string `json:"creation_source"` // CurrentState The branch state CurrentState BranchState `json:"current_state"` DataTransferBytes int64 `json:"data_transfer_bytes"` // Id The branch ID. This value is generated when a branch is created. A `branch_id` value has a `br` prefix. For example: `br-small-term-683261`. Id string `json:"id"` // LogicalSize The logical size of the branch, in bytes LogicalSize *int64 `json:"logical_size,omitempty"` // Name The branch name Name string `json:"name"` // ParentId The `branch_id` of the parent branch ParentId *string `json:"parent_id,omitempty"` // ParentLsn The Log Sequence Number (LSN) on the parent branch from which this branch was created ParentLsn *string `json:"parent_lsn,omitempty"` // ParentTimestamp The point in time on the parent branch from which this branch was created ParentTimestamp *time.Time `json:"parent_timestamp,omitempty"` // PendingState The branch state PendingState *BranchState `json:"pending_state,omitempty"` // Primary Whether the branch is the project's primary branch Primary bool `json:"primary"` // ProjectId The ID of the project to which the branch belongs ProjectId string `json:"project_id"` // UpdatedAt A timestamp indicating when the branch was last updated UpdatedAt time.Time `json:"updated_at"` WrittenDataBytes int64 `json:"written_data_bytes"` }
Branch defines model for Branch.
type BranchCreateRequest ¶
type BranchCreateRequest struct { Branch *struct { // Name The branch name Name *string `json:"name,omitempty"` // ParentId The `branch_id` of the parent branch ParentId *string `json:"parent_id,omitempty"` // ParentLsn A Log Sequence Number (LSN) on the parent branch. The branch will be created with data from this LSN. ParentLsn *string `json:"parent_lsn,omitempty"` // ParentTimestamp A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time. ParentTimestamp *time.Time `json:"parent_timestamp,omitempty"` } `json:"branch,omitempty"` Endpoints *[]BranchCreateRequestEndpointOptions `json:"endpoints,omitempty"` }
BranchCreateRequest defines model for BranchCreateRequest.
type BranchCreateRequestEndpointOptions ¶
type BranchCreateRequestEndpointOptions struct { AutoscalingLimitMaxCu *ComputeUnit `json:"autoscaling_limit_max_cu,omitempty"` AutoscalingLimitMinCu *ComputeUnit `json:"autoscaling_limit_min_cu,omitempty"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner *Provisioner `json:"provisioner,omitempty"` // SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is // automatically suspended. The value `0` means use the global default. // The value `-1` means never suspend. The default value is `300` seconds (5 minutes). // The maximum value is `604800` seconds (1 week). For more information, see // [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). SuspendTimeoutSeconds *SuspendTimeoutSeconds `json:"suspend_timeout_seconds,omitempty"` // Type The compute endpoint type. Either `read_write` or `read_only`. // The `read_only` compute endpoint type is not yet supported. Type EndpointType `json:"type"` }
BranchCreateRequestEndpointOptions defines model for BranchCreateRequestEndpointOptions.
type BranchOperations ¶
type BranchOperations struct { Branch Branch `json:"branch"` Operations []Operation `json:"operations"` }
BranchOperations defines model for BranchOperations.
type BranchResponse ¶
type BranchResponse struct {
Branch Branch `json:"branch"`
}
BranchResponse defines model for BranchResponse.
type BranchState ¶
type BranchState string
BranchState The branch state
const ( BranchStateInit BranchState = "init" BranchStateReady BranchState = "ready" )
Defines values for BranchState.
type BranchUpdateRequest ¶
type BranchUpdateRequest struct { Branch struct { Name *string `json:"name,omitempty"` } `json:"branch"` }
BranchUpdateRequest defines model for BranchUpdateRequest.
type BranchesResponse ¶
type BranchesResponse struct {
Branches []Branch `json:"branches"`
}
BranchesResponse defines model for BranchesResponse.
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateApiKey ¶
func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateApiKeyWithBody ¶
func (*Client) CreateProject ¶
func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProjectBranch ¶
func (c *Client) CreateProjectBranch(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProjectBranchDatabase ¶
func (c *Client) CreateProjectBranchDatabase(ctx context.Context, projectId string, branchId string, body CreateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProjectBranchDatabaseWithBody ¶
func (*Client) CreateProjectBranchRole ¶
func (c *Client) CreateProjectBranchRole(ctx context.Context, projectId string, branchId string, body CreateProjectBranchRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProjectBranchRoleWithBody ¶
func (*Client) CreateProjectBranchWithBody ¶
func (*Client) CreateProjectEndpoint ¶
func (c *Client) CreateProjectEndpoint(ctx context.Context, projectId string, body CreateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProjectEndpointWithBody ¶
func (*Client) CreateProjectWithBody ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteProjectBranch ¶
func (*Client) DeleteProjectBranchDatabase ¶
func (*Client) DeleteProjectBranchRole ¶
func (*Client) DeleteProjectEndpoint ¶
func (*Client) GetProject ¶
func (*Client) GetProjectBranch ¶
func (*Client) GetProjectBranchDatabase ¶
func (*Client) GetProjectBranchRole ¶
func (*Client) GetProjectBranchRolePassword ¶
func (*Client) GetProjectEndpoint ¶
func (*Client) GetProjectOperation ¶
func (c *Client) GetProjectOperation(ctx context.Context, projectId string, operationId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListApiKeys ¶
func (*Client) ListProjectBranchDatabases ¶
func (*Client) ListProjectBranchEndpoints ¶
func (*Client) ListProjectBranchRoles ¶
func (*Client) ListProjectBranches ¶
func (*Client) ListProjectEndpoints ¶
func (*Client) ListProjectOperations ¶
func (c *Client) ListProjectOperations(ctx context.Context, projectId string, params *ListProjectOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ResetProjectBranchRolePassword ¶
func (*Client) RevokeApiKey ¶
func (*Client) SetPrimaryProjectBranch ¶
func (*Client) StartProjectEndpoint ¶
func (*Client) SuspendProjectEndpoint ¶
func (*Client) UpdateProject ¶
func (c *Client) UpdateProject(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateProjectBranch ¶
func (c *Client) UpdateProjectBranch(ctx context.Context, projectId string, branchId string, body UpdateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateProjectBranchDatabase ¶
func (*Client) UpdateProjectBranchDatabaseWithBody ¶
func (*Client) UpdateProjectBranchWithBody ¶
func (*Client) UpdateProjectEndpoint ¶
func (c *Client) UpdateProjectEndpoint(ctx context.Context, projectId string, endpointId string, body UpdateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateProjectEndpointWithBody ¶
type ClientInterface ¶
type ClientInterface interface { // ListApiKeys request ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateApiKey request with any body CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // RevokeApiKey request RevokeApiKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjects request ListProjects(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProject request with any body CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProject request DeleteProject(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProject request GetProject(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProject request with any body UpdateProjectWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProject(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectBranches request ListProjectBranches(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProjectBranch request with any body CreateProjectBranchWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProjectBranch(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProjectBranch request DeleteProjectBranch(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectBranch request GetProjectBranch(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProjectBranch request with any body UpdateProjectBranchWithBody(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProjectBranch(ctx context.Context, projectId string, branchId string, body UpdateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectBranchDatabases request ListProjectBranchDatabases(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProjectBranchDatabase request with any body CreateProjectBranchDatabaseWithBody(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProjectBranchDatabase(ctx context.Context, projectId string, branchId string, body CreateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProjectBranchDatabase request DeleteProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectBranchDatabase request GetProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProjectBranchDatabase request with any body UpdateProjectBranchDatabaseWithBody(ctx context.Context, projectId string, branchId string, databaseName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProjectBranchDatabase(ctx context.Context, projectId string, branchId string, databaseName string, body UpdateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectBranchEndpoints request ListProjectBranchEndpoints(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectBranchRoles request ListProjectBranchRoles(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProjectBranchRole request with any body CreateProjectBranchRoleWithBody(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProjectBranchRole(ctx context.Context, projectId string, branchId string, body CreateProjectBranchRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProjectBranchRole request DeleteProjectBranchRole(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectBranchRole request GetProjectBranchRole(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*http.Response, error) // ResetProjectBranchRolePassword request ResetProjectBranchRolePassword(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectBranchRolePassword request GetProjectBranchRolePassword(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*http.Response, error) // SetPrimaryProjectBranch request SetPrimaryProjectBranch(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectEndpoints request ListProjectEndpoints(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProjectEndpoint request with any body CreateProjectEndpointWithBody(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProjectEndpoint(ctx context.Context, projectId string, body CreateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProjectEndpoint request DeleteProjectEndpoint(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectEndpoint request GetProjectEndpoint(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProjectEndpoint request with any body UpdateProjectEndpointWithBody(ctx context.Context, projectId string, endpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProjectEndpoint(ctx context.Context, projectId string, endpointId string, body UpdateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // StartProjectEndpoint request StartProjectEndpoint(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) // SuspendProjectEndpoint request SuspendProjectEndpoint(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListProjectOperations request ListProjectOperations(ctx context.Context, projectId string, params *ListProjectOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectOperation request GetProjectOperation(ctx context.Context, projectId string, operationId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateApiKeyWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
CreateApiKeyWithBodyWithResponse request with arbitrary body returning *CreateApiKeyResponse
func (*ClientWithResponses) CreateApiKeyWithResponse ¶
func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
func (*ClientWithResponses) CreateProjectBranchDatabaseWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchDatabaseResponse, error)
CreateProjectBranchDatabaseWithBodyWithResponse request with arbitrary body returning *CreateProjectBranchDatabaseResponse
func (*ClientWithResponses) CreateProjectBranchDatabaseWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, body CreateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchDatabaseResponse, error)
func (*ClientWithResponses) CreateProjectBranchRoleWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchRoleWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchRoleResponse, error)
CreateProjectBranchRoleWithBodyWithResponse request with arbitrary body returning *CreateProjectBranchRoleResponse
func (*ClientWithResponses) CreateProjectBranchRoleWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, body CreateProjectBranchRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchRoleResponse, error)
func (*ClientWithResponses) CreateProjectBranchWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchResponse, error)
CreateProjectBranchWithBodyWithResponse request with arbitrary body returning *CreateProjectBranchResponse
func (*ClientWithResponses) CreateProjectBranchWithResponse ¶
func (c *ClientWithResponses) CreateProjectBranchWithResponse(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchResponse, error)
func (*ClientWithResponses) CreateProjectEndpointWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectEndpointResponse, error)
CreateProjectEndpointWithBodyWithResponse request with arbitrary body returning *CreateProjectEndpointResponse
func (*ClientWithResponses) CreateProjectEndpointWithResponse ¶
func (c *ClientWithResponses) CreateProjectEndpointWithResponse(ctx context.Context, projectId string, body CreateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectEndpointResponse, error)
func (*ClientWithResponses) CreateProjectWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error)
CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse
func (*ClientWithResponses) CreateProjectWithResponse ¶
func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error)
func (*ClientWithResponses) DeleteProjectBranchDatabaseWithResponse ¶
func (c *ClientWithResponses) DeleteProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchDatabaseResponse, error)
DeleteProjectBranchDatabaseWithResponse request returning *DeleteProjectBranchDatabaseResponse
func (*ClientWithResponses) DeleteProjectBranchRoleWithResponse ¶
func (c *ClientWithResponses) DeleteProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchRoleResponse, error)
DeleteProjectBranchRoleWithResponse request returning *DeleteProjectBranchRoleResponse
func (*ClientWithResponses) DeleteProjectBranchWithResponse ¶
func (c *ClientWithResponses) DeleteProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchResponse, error)
DeleteProjectBranchWithResponse request returning *DeleteProjectBranchResponse
func (*ClientWithResponses) DeleteProjectEndpointWithResponse ¶
func (c *ClientWithResponses) DeleteProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*DeleteProjectEndpointResponse, error)
DeleteProjectEndpointWithResponse request returning *DeleteProjectEndpointResponse
func (*ClientWithResponses) DeleteProjectWithResponse ¶
func (c *ClientWithResponses) DeleteProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error)
DeleteProjectWithResponse request returning *DeleteProjectResponse
func (*ClientWithResponses) GetProjectBranchDatabaseWithResponse ¶
func (c *ClientWithResponses) GetProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*GetProjectBranchDatabaseResponse, error)
GetProjectBranchDatabaseWithResponse request returning *GetProjectBranchDatabaseResponse
func (*ClientWithResponses) GetProjectBranchRolePasswordWithResponse ¶
func (c *ClientWithResponses) GetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*GetProjectBranchRolePasswordResponse, error)
GetProjectBranchRolePasswordWithResponse request returning *GetProjectBranchRolePasswordResponse
func (*ClientWithResponses) GetProjectBranchRoleWithResponse ¶
func (c *ClientWithResponses) GetProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*GetProjectBranchRoleResponse, error)
GetProjectBranchRoleWithResponse request returning *GetProjectBranchRoleResponse
func (*ClientWithResponses) GetProjectBranchWithResponse ¶
func (c *ClientWithResponses) GetProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*GetProjectBranchResponse, error)
GetProjectBranchWithResponse request returning *GetProjectBranchResponse
func (*ClientWithResponses) GetProjectEndpointWithResponse ¶
func (c *ClientWithResponses) GetProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*GetProjectEndpointResponse, error)
GetProjectEndpointWithResponse request returning *GetProjectEndpointResponse
func (*ClientWithResponses) GetProjectOperationWithResponse ¶
func (c *ClientWithResponses) GetProjectOperationWithResponse(ctx context.Context, projectId string, operationId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetProjectOperationResponse, error)
GetProjectOperationWithResponse request returning *GetProjectOperationResponse
func (*ClientWithResponses) GetProjectWithResponse ¶
func (c *ClientWithResponses) GetProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*GetProjectResponse, error)
GetProjectWithResponse request returning *GetProjectResponse
func (*ClientWithResponses) ListApiKeysWithResponse ¶
func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)
ListApiKeysWithResponse request returning *ListApiKeysResponse
func (*ClientWithResponses) ListProjectBranchDatabasesWithResponse ¶
func (c *ClientWithResponses) ListProjectBranchDatabasesWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchDatabasesResponse, error)
ListProjectBranchDatabasesWithResponse request returning *ListProjectBranchDatabasesResponse
func (*ClientWithResponses) ListProjectBranchEndpointsWithResponse ¶
func (c *ClientWithResponses) ListProjectBranchEndpointsWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchEndpointsResponse, error)
ListProjectBranchEndpointsWithResponse request returning *ListProjectBranchEndpointsResponse
func (*ClientWithResponses) ListProjectBranchRolesWithResponse ¶
func (c *ClientWithResponses) ListProjectBranchRolesWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchRolesResponse, error)
ListProjectBranchRolesWithResponse request returning *ListProjectBranchRolesResponse
func (*ClientWithResponses) ListProjectBranchesWithResponse ¶
func (c *ClientWithResponses) ListProjectBranchesWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectBranchesResponse, error)
ListProjectBranchesWithResponse request returning *ListProjectBranchesResponse
func (*ClientWithResponses) ListProjectEndpointsWithResponse ¶
func (c *ClientWithResponses) ListProjectEndpointsWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectEndpointsResponse, error)
ListProjectEndpointsWithResponse request returning *ListProjectEndpointsResponse
func (*ClientWithResponses) ListProjectOperationsWithResponse ¶
func (c *ClientWithResponses) ListProjectOperationsWithResponse(ctx context.Context, projectId string, params *ListProjectOperationsParams, reqEditors ...RequestEditorFn) (*ListProjectOperationsResponse, error)
ListProjectOperationsWithResponse request returning *ListProjectOperationsResponse
func (*ClientWithResponses) ListProjectsWithResponse ¶
func (c *ClientWithResponses) ListProjectsWithResponse(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error)
ListProjectsWithResponse request returning *ListProjectsResponse
func (*ClientWithResponses) ResetProjectBranchRolePasswordWithResponse ¶
func (c *ClientWithResponses) ResetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*ResetProjectBranchRolePasswordResponse, error)
ResetProjectBranchRolePasswordWithResponse request returning *ResetProjectBranchRolePasswordResponse
func (*ClientWithResponses) RevokeApiKeyWithResponse ¶
func (c *ClientWithResponses) RevokeApiKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error)
RevokeApiKeyWithResponse request returning *RevokeApiKeyResponse
func (*ClientWithResponses) SetPrimaryProjectBranchWithResponse ¶
func (c *ClientWithResponses) SetPrimaryProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*SetPrimaryProjectBranchResponse, error)
SetPrimaryProjectBranchWithResponse request returning *SetPrimaryProjectBranchResponse
func (*ClientWithResponses) StartProjectEndpointWithResponse ¶
func (c *ClientWithResponses) StartProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*StartProjectEndpointResponse, error)
StartProjectEndpointWithResponse request returning *StartProjectEndpointResponse
func (*ClientWithResponses) SuspendProjectEndpointWithResponse ¶
func (c *ClientWithResponses) SuspendProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*SuspendProjectEndpointResponse, error)
SuspendProjectEndpointWithResponse request returning *SuspendProjectEndpointResponse
func (*ClientWithResponses) UpdateProjectBranchDatabaseWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectBranchDatabaseResponse, error)
UpdateProjectBranchDatabaseWithBodyWithResponse request with arbitrary body returning *UpdateProjectBranchDatabaseResponse
func (*ClientWithResponses) UpdateProjectBranchDatabaseWithResponse ¶
func (c *ClientWithResponses) UpdateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, body UpdateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectBranchDatabaseResponse, error)
func (*ClientWithResponses) UpdateProjectBranchWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectBranchResponse, error)
UpdateProjectBranchWithBodyWithResponse request with arbitrary body returning *UpdateProjectBranchResponse
func (*ClientWithResponses) UpdateProjectBranchWithResponse ¶
func (c *ClientWithResponses) UpdateProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, body UpdateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectBranchResponse, error)
func (*ClientWithResponses) UpdateProjectEndpointWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, endpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectEndpointResponse, error)
UpdateProjectEndpointWithBodyWithResponse request with arbitrary body returning *UpdateProjectEndpointResponse
func (*ClientWithResponses) UpdateProjectEndpointWithResponse ¶
func (c *ClientWithResponses) UpdateProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, body UpdateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectEndpointResponse, error)
func (*ClientWithResponses) UpdateProjectWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProjectWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error)
UpdateProjectWithBodyWithResponse request with arbitrary body returning *UpdateProjectResponse
func (*ClientWithResponses) UpdateProjectWithResponse ¶
func (c *ClientWithResponses) UpdateProjectWithResponse(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // ListApiKeys request ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error) // CreateApiKey request with any body CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) // RevokeApiKey request RevokeApiKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error) // ListProjects request ListProjectsWithResponse(ctx context.Context, params *ListProjectsParams, reqEditors ...RequestEditorFn) (*ListProjectsResponse, error) // CreateProject request with any body CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) // DeleteProject request DeleteProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*DeleteProjectResponse, error) // GetProject request GetProjectWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) // UpdateProject request with any body UpdateProjectWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) UpdateProjectWithResponse(ctx context.Context, projectId string, body UpdateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectResponse, error) // ListProjectBranches request ListProjectBranchesWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectBranchesResponse, error) // CreateProjectBranch request with any body CreateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchResponse, error) CreateProjectBranchWithResponse(ctx context.Context, projectId string, body CreateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchResponse, error) // DeleteProjectBranch request DeleteProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchResponse, error) // GetProjectBranch request GetProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*GetProjectBranchResponse, error) // UpdateProjectBranch request with any body UpdateProjectBranchWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectBranchResponse, error) UpdateProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, body UpdateProjectBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectBranchResponse, error) // ListProjectBranchDatabases request ListProjectBranchDatabasesWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchDatabasesResponse, error) // CreateProjectBranchDatabase request with any body CreateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchDatabaseResponse, error) CreateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, body CreateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchDatabaseResponse, error) // DeleteProjectBranchDatabase request DeleteProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchDatabaseResponse, error) // GetProjectBranchDatabase request GetProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, reqEditors ...RequestEditorFn) (*GetProjectBranchDatabaseResponse, error) // UpdateProjectBranchDatabase request with any body UpdateProjectBranchDatabaseWithBodyWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectBranchDatabaseResponse, error) UpdateProjectBranchDatabaseWithResponse(ctx context.Context, projectId string, branchId string, databaseName string, body UpdateProjectBranchDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectBranchDatabaseResponse, error) // ListProjectBranchEndpoints request ListProjectBranchEndpointsWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchEndpointsResponse, error) // ListProjectBranchRoles request ListProjectBranchRolesWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*ListProjectBranchRolesResponse, error) // CreateProjectBranchRole request with any body CreateProjectBranchRoleWithBodyWithResponse(ctx context.Context, projectId string, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectBranchRoleResponse, error) CreateProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, body CreateProjectBranchRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectBranchRoleResponse, error) // DeleteProjectBranchRole request DeleteProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*DeleteProjectBranchRoleResponse, error) // GetProjectBranchRole request GetProjectBranchRoleWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*GetProjectBranchRoleResponse, error) // ResetProjectBranchRolePassword request ResetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*ResetProjectBranchRolePasswordResponse, error) // GetProjectBranchRolePassword request GetProjectBranchRolePasswordWithResponse(ctx context.Context, projectId string, branchId string, roleName string, reqEditors ...RequestEditorFn) (*GetProjectBranchRolePasswordResponse, error) // SetPrimaryProjectBranch request SetPrimaryProjectBranchWithResponse(ctx context.Context, projectId string, branchId string, reqEditors ...RequestEditorFn) (*SetPrimaryProjectBranchResponse, error) // ListProjectEndpoints request ListProjectEndpointsWithResponse(ctx context.Context, projectId string, reqEditors ...RequestEditorFn) (*ListProjectEndpointsResponse, error) // CreateProjectEndpoint request with any body CreateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectEndpointResponse, error) CreateProjectEndpointWithResponse(ctx context.Context, projectId string, body CreateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectEndpointResponse, error) // DeleteProjectEndpoint request DeleteProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*DeleteProjectEndpointResponse, error) // GetProjectEndpoint request GetProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*GetProjectEndpointResponse, error) // UpdateProjectEndpoint request with any body UpdateProjectEndpointWithBodyWithResponse(ctx context.Context, projectId string, endpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProjectEndpointResponse, error) UpdateProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, body UpdateProjectEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProjectEndpointResponse, error) // StartProjectEndpoint request StartProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*StartProjectEndpointResponse, error) // SuspendProjectEndpoint request SuspendProjectEndpointWithResponse(ctx context.Context, projectId string, endpointId string, reqEditors ...RequestEditorFn) (*SuspendProjectEndpointResponse, error) // ListProjectOperations request ListProjectOperationsWithResponse(ctx context.Context, projectId string, params *ListProjectOperationsParams, reqEditors ...RequestEditorFn) (*ListProjectOperationsResponse, error) // GetProjectOperation request GetProjectOperationWithResponse(ctx context.Context, projectId string, operationId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetProjectOperationResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConnectionDetails ¶
type ConnectionDetails struct { ConnectionParameters ConnectionParameters `json:"connection_parameters"` // ConnectionUri Connection URI is same as specified in https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6 // It is a ready to use string for psql or for DATABASE_URL environment variable. ConnectionUri string `json:"connection_uri"` }
ConnectionDetails defines model for ConnectionDetails.
type ConnectionParameters ¶
type ConnectionParameters struct { // Database Database name. Database string `json:"database"` // Host Host name. Host string `json:"host"` // Password Password for the role. Password string `json:"password"` // PoolerHost Pooler host name. PoolerHost string `json:"pooler_host"` // Role Role name. Role string `json:"role"` }
ConnectionParameters defines model for ConnectionParameters.
type ConnectionURIsOptionalResponse ¶
type ConnectionURIsOptionalResponse struct {
ConnectionUris *[]ConnectionDetails `json:"connection_uris,omitempty"`
}
ConnectionURIsOptionalResponse defines model for ConnectionURIsOptionalResponse.
type ConnectionURIsResponse ¶
type ConnectionURIsResponse struct {
ConnectionUris []ConnectionDetails `json:"connection_uris"`
}
ConnectionURIsResponse defines model for ConnectionURIsResponse.
type CreateApiKeyJSONRequestBody ¶
type CreateApiKeyJSONRequestBody = ApiKeyCreateRequest
CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.
type CreateApiKeyResponse ¶
type CreateApiKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ApiKeyCreateResponse JSONDefault *GeneralError }
func ParseCreateApiKeyResponse ¶
func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error)
ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call
func (CreateApiKeyResponse) Status ¶
func (r CreateApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateApiKeyResponse) StatusCode ¶
func (r CreateApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProjectBranchDatabaseJSONRequestBody ¶
type CreateProjectBranchDatabaseJSONRequestBody = DatabaseCreateRequest
CreateProjectBranchDatabaseJSONRequestBody defines body for CreateProjectBranchDatabase for application/json ContentType.
type CreateProjectBranchDatabaseResponse ¶
type CreateProjectBranchDatabaseResponse struct { Body []byte HTTPResponse *http.Response JSON201 *DatabaseOperations JSONDefault *GeneralError }
func ParseCreateProjectBranchDatabaseResponse ¶
func ParseCreateProjectBranchDatabaseResponse(rsp *http.Response) (*CreateProjectBranchDatabaseResponse, error)
ParseCreateProjectBranchDatabaseResponse parses an HTTP response from a CreateProjectBranchDatabaseWithResponse call
func (CreateProjectBranchDatabaseResponse) Status ¶
func (r CreateProjectBranchDatabaseResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProjectBranchDatabaseResponse) StatusCode ¶
func (r CreateProjectBranchDatabaseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProjectBranchJSONRequestBody ¶
type CreateProjectBranchJSONRequestBody = BranchCreateRequest
CreateProjectBranchJSONRequestBody defines body for CreateProjectBranch for application/json ContentType.
type CreateProjectBranchResponse ¶
type CreateProjectBranchResponse struct { Body []byte HTTPResponse *http.Response JSON201 *struct { Branch Branch `json:"branch"` ConnectionUris *[]ConnectionDetails `json:"connection_uris,omitempty"` Endpoints []Endpoint `json:"endpoints"` Operations []Operation `json:"operations"` } JSONDefault *GeneralError }
func ParseCreateProjectBranchResponse ¶
func ParseCreateProjectBranchResponse(rsp *http.Response) (*CreateProjectBranchResponse, error)
ParseCreateProjectBranchResponse parses an HTTP response from a CreateProjectBranchWithResponse call
func (CreateProjectBranchResponse) Status ¶
func (r CreateProjectBranchResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProjectBranchResponse) StatusCode ¶
func (r CreateProjectBranchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProjectBranchRoleJSONRequestBody ¶
type CreateProjectBranchRoleJSONRequestBody = RoleCreateRequest
CreateProjectBranchRoleJSONRequestBody defines body for CreateProjectBranchRole for application/json ContentType.
type CreateProjectBranchRoleResponse ¶
type CreateProjectBranchRoleResponse struct { Body []byte HTTPResponse *http.Response JSON201 *RoleOperations JSONDefault *GeneralError }
func ParseCreateProjectBranchRoleResponse ¶
func ParseCreateProjectBranchRoleResponse(rsp *http.Response) (*CreateProjectBranchRoleResponse, error)
ParseCreateProjectBranchRoleResponse parses an HTTP response from a CreateProjectBranchRoleWithResponse call
func (CreateProjectBranchRoleResponse) Status ¶
func (r CreateProjectBranchRoleResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProjectBranchRoleResponse) StatusCode ¶
func (r CreateProjectBranchRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProjectEndpointJSONRequestBody ¶
type CreateProjectEndpointJSONRequestBody = EndpointCreateRequest
CreateProjectEndpointJSONRequestBody defines body for CreateProjectEndpoint for application/json ContentType.
type CreateProjectEndpointResponse ¶
type CreateProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON201 *EndpointOperations JSONDefault *GeneralError }
func ParseCreateProjectEndpointResponse ¶
func ParseCreateProjectEndpointResponse(rsp *http.Response) (*CreateProjectEndpointResponse, error)
ParseCreateProjectEndpointResponse parses an HTTP response from a CreateProjectEndpointWithResponse call
func (CreateProjectEndpointResponse) Status ¶
func (r CreateProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProjectEndpointResponse) StatusCode ¶
func (r CreateProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProjectJSONRequestBody ¶
type CreateProjectJSONRequestBody = ProjectCreateRequest
CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType.
type CreateProjectResponse ¶
type CreateProjectResponse struct { Body []byte HTTPResponse *http.Response JSON201 *struct { Branch Branch `json:"branch"` ConnectionUris []ConnectionDetails `json:"connection_uris"` Databases []Database `json:"databases"` Endpoints []Endpoint `json:"endpoints"` Operations []Operation `json:"operations"` Project Project `json:"project"` Roles []Role `json:"roles"` } JSONDefault *GeneralError }
func ParseCreateProjectResponse ¶
func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error)
ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call
func (CreateProjectResponse) Status ¶
func (r CreateProjectResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProjectResponse) StatusCode ¶
func (r CreateProjectResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatedBranch ¶
type CreatedBranch struct { Branch Branch `json:"branch"` ConnectionUris *[]ConnectionDetails `json:"connection_uris,omitempty"` Endpoints []Endpoint `json:"endpoints"` Operations []Operation `json:"operations"` }
CreatedBranch defines model for CreatedBranch.
type CreatedProject ¶
type CreatedProject struct { Branch Branch `json:"branch"` ConnectionUris []ConnectionDetails `json:"connection_uris"` Databases []Database `json:"databases"` Endpoints []Endpoint `json:"endpoints"` Operations []Operation `json:"operations"` Project Project `json:"project"` Roles []Role `json:"roles"` }
CreatedProject defines model for CreatedProject.
type Database ¶
type Database struct { // BranchId The ID of the branch to which the database belongs BranchId string `json:"branch_id"` // CreatedAt A timestamp indicating when the database was created CreatedAt time.Time `json:"created_at"` // Id The database ID Id int64 `json:"id"` // Name The database name Name string `json:"name"` // OwnerName The name of role that owns the database OwnerName string `json:"owner_name"` // UpdatedAt A timestamp indicating when the database was last updated UpdatedAt time.Time `json:"updated_at"` }
Database defines model for Database.
type DatabaseCreateRequest ¶
type DatabaseCreateRequest struct { Database struct { // Name The name of the datbase Name string `json:"name"` // OwnerName The name of the role that owns the database OwnerName string `json:"owner_name"` } `json:"database"` }
DatabaseCreateRequest defines model for DatabaseCreateRequest.
type DatabaseOperations ¶
type DatabaseOperations struct { Database Database `json:"database"` Operations []Operation `json:"operations"` }
DatabaseOperations defines model for DatabaseOperations.
type DatabaseResponse ¶
type DatabaseResponse struct {
Database Database `json:"database"`
}
DatabaseResponse defines model for DatabaseResponse.
type DatabaseUpdateRequest ¶
type DatabaseUpdateRequest struct { Database struct { // Name The name of the database Name *string `json:"name,omitempty"` // OwnerName The name of the role that owns the database OwnerName *string `json:"owner_name,omitempty"` } `json:"database"` }
DatabaseUpdateRequest defines model for DatabaseUpdateRequest.
type DatabasesResponse ¶
type DatabasesResponse struct {
Databases []Database `json:"databases"`
}
DatabasesResponse defines model for DatabasesResponse.
type DefaultEndpointSettings ¶
type DefaultEndpointSettings struct { AutoscalingLimitMaxCu *ComputeUnit `json:"autoscaling_limit_max_cu,omitempty"` AutoscalingLimitMinCu *ComputeUnit `json:"autoscaling_limit_min_cu,omitempty"` // PgSettings A raw representation of PostgreSQL settings PgSettings *PgSettingsData `json:"pg_settings,omitempty"` // SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is // automatically suspended. The value `0` means use the global default. // The value `-1` means never suspend. The default value is `300` seconds (5 minutes). // The maximum value is `604800` seconds (1 week). For more information, see // [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). SuspendTimeoutSeconds *SuspendTimeoutSeconds `json:"suspend_timeout_seconds,omitempty"` AdditionalProperties map[string]string `json:"-"` }
DefaultEndpointSettings A collection of settings for a Neon endpoint
func (DefaultEndpointSettings) Get ¶
func (a DefaultEndpointSettings) Get(fieldName string) (value string, found bool)
Getter for additional properties for DefaultEndpointSettings. Returns the specified element and whether it was found
func (DefaultEndpointSettings) MarshalJSON ¶
func (a DefaultEndpointSettings) MarshalJSON() ([]byte, error)
Override default JSON handling for DefaultEndpointSettings to handle AdditionalProperties
func (*DefaultEndpointSettings) Set ¶
func (a *DefaultEndpointSettings) Set(fieldName string, value string)
Setter for additional properties for DefaultEndpointSettings
func (*DefaultEndpointSettings) UnmarshalJSON ¶
func (a *DefaultEndpointSettings) UnmarshalJSON(b []byte) error
Override default JSON handling for DefaultEndpointSettings to handle AdditionalProperties
type DeleteProjectBranchDatabaseResponse ¶
type DeleteProjectBranchDatabaseResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DatabaseOperations JSONDefault *GeneralError }
func ParseDeleteProjectBranchDatabaseResponse ¶
func ParseDeleteProjectBranchDatabaseResponse(rsp *http.Response) (*DeleteProjectBranchDatabaseResponse, error)
ParseDeleteProjectBranchDatabaseResponse parses an HTTP response from a DeleteProjectBranchDatabaseWithResponse call
func (DeleteProjectBranchDatabaseResponse) Status ¶
func (r DeleteProjectBranchDatabaseResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProjectBranchDatabaseResponse) StatusCode ¶
func (r DeleteProjectBranchDatabaseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProjectBranchResponse ¶
type DeleteProjectBranchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BranchOperations JSONDefault *GeneralError }
func ParseDeleteProjectBranchResponse ¶
func ParseDeleteProjectBranchResponse(rsp *http.Response) (*DeleteProjectBranchResponse, error)
ParseDeleteProjectBranchResponse parses an HTTP response from a DeleteProjectBranchWithResponse call
func (DeleteProjectBranchResponse) Status ¶
func (r DeleteProjectBranchResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProjectBranchResponse) StatusCode ¶
func (r DeleteProjectBranchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProjectBranchRoleResponse ¶
type DeleteProjectBranchRoleResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RoleOperations JSONDefault *GeneralError }
func ParseDeleteProjectBranchRoleResponse ¶
func ParseDeleteProjectBranchRoleResponse(rsp *http.Response) (*DeleteProjectBranchRoleResponse, error)
ParseDeleteProjectBranchRoleResponse parses an HTTP response from a DeleteProjectBranchRoleWithResponse call
func (DeleteProjectBranchRoleResponse) Status ¶
func (r DeleteProjectBranchRoleResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProjectBranchRoleResponse) StatusCode ¶
func (r DeleteProjectBranchRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProjectEndpointResponse ¶
type DeleteProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointOperations JSONDefault *GeneralError }
func ParseDeleteProjectEndpointResponse ¶
func ParseDeleteProjectEndpointResponse(rsp *http.Response) (*DeleteProjectEndpointResponse, error)
ParseDeleteProjectEndpointResponse parses an HTTP response from a DeleteProjectEndpointWithResponse call
func (DeleteProjectEndpointResponse) Status ¶
func (r DeleteProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProjectEndpointResponse) StatusCode ¶
func (r DeleteProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProjectResponse ¶
type DeleteProjectResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProjectResponse JSONDefault *GeneralError }
func ParseDeleteProjectResponse ¶
func ParseDeleteProjectResponse(rsp *http.Response) (*DeleteProjectResponse, error)
ParseDeleteProjectResponse parses an HTTP response from a DeleteProjectWithResponse call
func (DeleteProjectResponse) Status ¶
func (r DeleteProjectResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProjectResponse) StatusCode ¶
func (r DeleteProjectResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Endpoint ¶
type Endpoint struct { AutoscalingLimitMaxCu ComputeUnit `json:"autoscaling_limit_max_cu"` AutoscalingLimitMinCu ComputeUnit `json:"autoscaling_limit_min_cu"` // BranchId The ID of the branch that the compute endpoint is associated with BranchId string `json:"branch_id"` // CreatedAt A timestamp indicating when the compute endpoint was created CreatedAt time.Time `json:"created_at"` // CreationSource The compute endpoint creation source CreationSource string `json:"creation_source"` // CurrentState The state of the compute endpoint CurrentState EndpointState `json:"current_state"` // Disabled Whether to restrict connections to the compute endpoint Disabled bool `json:"disabled"` // Host The hostname of the compute endpoint. This is the hostname specified when connecting to a Neon database. Host string `json:"host"` // Id The compute endpoint ID. Compute endpoint IDs have an `ep-` prefix. For example: `ep-little-smoke-851426` Id string `json:"id"` // LastActive A timestamp indicating when the compute endpoint was last active LastActive *time.Time `json:"last_active,omitempty"` // PasswordlessAccess Whether to permit passwordless access to the compute endpoint PasswordlessAccess bool `json:"passwordless_access"` // PendingState The state of the compute endpoint PendingState *EndpointState `json:"pending_state,omitempty"` // PoolerEnabled Whether connection pooling is enabled for the compute endpoint PoolerEnabled bool `json:"pooler_enabled"` // PoolerMode The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. PoolerMode EndpointPoolerMode `json:"pooler_mode"` // ProjectId The ID of the project to which the compute endpoint belongs ProjectId string `json:"project_id"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner Provisioner `json:"provisioner"` // ProxyHost DEPRECATED. Use the "host" property instead. ProxyHost string `json:"proxy_host"` // RegionId The region identifier RegionId string `json:"region_id"` // Settings A collection of settings for a compute endpoint Settings EndpointSettingsData `json:"settings"` // SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is // automatically suspended. The value `0` means use the global default. // The value `-1` means never suspend. The default value is `300` seconds (5 minutes). // The maximum value is `604800` seconds (1 week). For more information, see // [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). SuspendTimeoutSeconds SuspendTimeoutSeconds `json:"suspend_timeout_seconds"` // Type The compute endpoint type. Either `read_write` or `read_only`. // The `read_only` compute endpoint type is not yet supported. Type EndpointType `json:"type"` // UpdatedAt A timestamp indicating when the compute endpoint was last updated UpdatedAt time.Time `json:"updated_at"` }
Endpoint defines model for Endpoint.
type EndpointCreateRequest ¶
type EndpointCreateRequest struct { Endpoint struct { AutoscalingLimitMaxCu *ComputeUnit `json:"autoscaling_limit_max_cu,omitempty"` AutoscalingLimitMinCu *ComputeUnit `json:"autoscaling_limit_min_cu,omitempty"` // BranchId The ID of the branch the compute endpoint will be associated with BranchId string `json:"branch_id"` // Disabled Whether to restrict connections to the compute endpoint Disabled *bool `json:"disabled,omitempty"` // PasswordlessAccess NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint. PasswordlessAccess *bool `json:"passwordless_access,omitempty"` // PoolerEnabled Whether to enable connection pooling for the compute endpoint PoolerEnabled *bool `json:"pooler_enabled,omitempty"` // PoolerMode The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. PoolerMode *EndpointPoolerMode `json:"pooler_mode,omitempty"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner *Provisioner `json:"provisioner,omitempty"` // RegionId The region where the compute endpoint will be created. Only the project's `region_id` is permitted. RegionId *string `json:"region_id,omitempty"` // Settings A collection of settings for a compute endpoint Settings *EndpointSettingsData `json:"settings,omitempty"` // SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is // automatically suspended. The value `0` means use the global default. // The value `-1` means never suspend. The default value is `300` seconds (5 minutes). // The maximum value is `604800` seconds (1 week). For more information, see // [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). SuspendTimeoutSeconds *SuspendTimeoutSeconds `json:"suspend_timeout_seconds,omitempty"` // Type The compute endpoint type. Either `read_write` or `read_only`. // The `read_only` compute endpoint type is not yet supported. Type EndpointType `json:"type"` } `json:"endpoint"` }
EndpointCreateRequest defines model for EndpointCreateRequest.
type EndpointOperations ¶
type EndpointOperations struct { Endpoint Endpoint `json:"endpoint"` Operations []Operation `json:"operations"` }
EndpointOperations defines model for EndpointOperations.
type EndpointPoolerMode ¶
type EndpointPoolerMode string
EndpointPoolerMode The connection pooler mode. Neon supports PgBouncer in `transaction` mode only.
const (
Transaction EndpointPoolerMode = "transaction"
)
Defines values for EndpointPoolerMode.
type EndpointResponse ¶
type EndpointResponse struct {
Endpoint Endpoint `json:"endpoint"`
}
EndpointResponse defines model for EndpointResponse.
type EndpointSettingsData ¶
type EndpointSettingsData struct { // PgSettings A raw representation of PostgreSQL settings PgSettings *PgSettingsData `json:"pg_settings,omitempty"` }
EndpointSettingsData A collection of settings for a compute endpoint
type EndpointState ¶
type EndpointState string
EndpointState The state of the compute endpoint
const ( EndpointStateActive EndpointState = "active" EndpointStateIdle EndpointState = "idle" EndpointStateInit EndpointState = "init" )
Defines values for EndpointState.
type EndpointType ¶
type EndpointType string
EndpointType The compute endpoint type. Either `read_write` or `read_only`. The `read_only` compute endpoint type is not yet supported.
const ( ReadOnly EndpointType = "read_only" ReadWrite EndpointType = "read_write" )
Defines values for EndpointType.
type EndpointUpdateRequest ¶
type EndpointUpdateRequest struct { Endpoint struct { AutoscalingLimitMaxCu *ComputeUnit `json:"autoscaling_limit_max_cu,omitempty"` AutoscalingLimitMinCu *ComputeUnit `json:"autoscaling_limit_min_cu,omitempty"` // BranchId The destination branch ID. The destination branch must not have an exsiting read-write endpoint. BranchId *string `json:"branch_id,omitempty"` // Disabled Whether to restrict connections to the compute endpoint Disabled *bool `json:"disabled,omitempty"` // PasswordlessAccess NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint. PasswordlessAccess *bool `json:"passwordless_access,omitempty"` // PoolerEnabled Whether to enable connection pooling for the compute endpoint PoolerEnabled *bool `json:"pooler_enabled,omitempty"` // PoolerMode The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. PoolerMode *EndpointPoolerMode `json:"pooler_mode,omitempty"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner *Provisioner `json:"provisioner,omitempty"` // Settings A collection of settings for a compute endpoint Settings *EndpointSettingsData `json:"settings,omitempty"` // SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is // automatically suspended. The value `0` means use the global default. // The value `-1` means never suspend. The default value is `300` seconds (5 minutes). // The maximum value is `604800` seconds (1 week). For more information, see // [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). SuspendTimeoutSeconds *SuspendTimeoutSeconds `json:"suspend_timeout_seconds,omitempty"` } `json:"endpoint"` }
EndpointUpdateRequest defines model for EndpointUpdateRequest.
type EndpointsResponse ¶
type EndpointsResponse struct {
Endpoints []Endpoint `json:"endpoints"`
}
EndpointsResponse defines model for EndpointsResponse.
type GeneralError ¶
type GeneralError struct { Code ErrorCode `json:"code"` // Message Error message Message string `json:"message"` }
GeneralError General Error
type GetProjectBranchDatabaseResponse ¶
type GetProjectBranchDatabaseResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DatabaseResponse JSONDefault *GeneralError }
func ParseGetProjectBranchDatabaseResponse ¶
func ParseGetProjectBranchDatabaseResponse(rsp *http.Response) (*GetProjectBranchDatabaseResponse, error)
ParseGetProjectBranchDatabaseResponse parses an HTTP response from a GetProjectBranchDatabaseWithResponse call
func (GetProjectBranchDatabaseResponse) Status ¶
func (r GetProjectBranchDatabaseResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectBranchDatabaseResponse) StatusCode ¶
func (r GetProjectBranchDatabaseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectBranchResponse ¶
type GetProjectBranchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BranchResponse JSONDefault *GeneralError }
func ParseGetProjectBranchResponse ¶
func ParseGetProjectBranchResponse(rsp *http.Response) (*GetProjectBranchResponse, error)
ParseGetProjectBranchResponse parses an HTTP response from a GetProjectBranchWithResponse call
func (GetProjectBranchResponse) Status ¶
func (r GetProjectBranchResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectBranchResponse) StatusCode ¶
func (r GetProjectBranchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectBranchRolePasswordResponse ¶
type GetProjectBranchRolePasswordResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RolePasswordResponse JSON404 *GeneralError JSON412 *GeneralError JSONDefault *GeneralError }
func ParseGetProjectBranchRolePasswordResponse ¶
func ParseGetProjectBranchRolePasswordResponse(rsp *http.Response) (*GetProjectBranchRolePasswordResponse, error)
ParseGetProjectBranchRolePasswordResponse parses an HTTP response from a GetProjectBranchRolePasswordWithResponse call
func (GetProjectBranchRolePasswordResponse) Status ¶
func (r GetProjectBranchRolePasswordResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectBranchRolePasswordResponse) StatusCode ¶
func (r GetProjectBranchRolePasswordResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectBranchRoleResponse ¶
type GetProjectBranchRoleResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RoleResponse JSONDefault *GeneralError }
func ParseGetProjectBranchRoleResponse ¶
func ParseGetProjectBranchRoleResponse(rsp *http.Response) (*GetProjectBranchRoleResponse, error)
ParseGetProjectBranchRoleResponse parses an HTTP response from a GetProjectBranchRoleWithResponse call
func (GetProjectBranchRoleResponse) Status ¶
func (r GetProjectBranchRoleResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectBranchRoleResponse) StatusCode ¶
func (r GetProjectBranchRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectEndpointResponse ¶
type GetProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointResponse JSONDefault *GeneralError }
func ParseGetProjectEndpointResponse ¶
func ParseGetProjectEndpointResponse(rsp *http.Response) (*GetProjectEndpointResponse, error)
ParseGetProjectEndpointResponse parses an HTTP response from a GetProjectEndpointWithResponse call
func (GetProjectEndpointResponse) Status ¶
func (r GetProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectEndpointResponse) StatusCode ¶
func (r GetProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectOperationResponse ¶
type GetProjectOperationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *OperationResponse JSONDefault *GeneralError }
func ParseGetProjectOperationResponse ¶
func ParseGetProjectOperationResponse(rsp *http.Response) (*GetProjectOperationResponse, error)
ParseGetProjectOperationResponse parses an HTTP response from a GetProjectOperationWithResponse call
func (GetProjectOperationResponse) Status ¶
func (r GetProjectOperationResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectOperationResponse) StatusCode ¶
func (r GetProjectOperationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectResponse ¶
type GetProjectResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProjectResponse JSONDefault *GeneralError }
func ParseGetProjectResponse ¶
func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error)
ParseGetProjectResponse parses an HTTP response from a GetProjectWithResponse call
func (GetProjectResponse) Status ¶
func (r GetProjectResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectResponse) StatusCode ¶
func (r GetProjectResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListApiKeysResponse ¶
type ListApiKeysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]ApiKeysListResponseItem JSONDefault *GeneralError }
func ParseListApiKeysResponse ¶
func ParseListApiKeysResponse(rsp *http.Response) (*ListApiKeysResponse, error)
ParseListApiKeysResponse parses an HTTP response from a ListApiKeysWithResponse call
func (ListApiKeysResponse) Status ¶
func (r ListApiKeysResponse) Status() string
Status returns HTTPResponse.Status
func (ListApiKeysResponse) StatusCode ¶
func (r ListApiKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListOperations ¶
type ListOperations struct { Operations []Operation `json:"operations"` // Pagination Cursor based pagination is used. The user must pass the cursor as is to the backend. // For more information about cursor based pagination, see // https://learn.microsoft.com/en-us/ef/core/querying/pagination#keyset-pagination Pagination *Pagination `json:"pagination,omitempty"` }
ListOperations defines model for ListOperations.
type ListProjectBranchDatabasesResponse ¶
type ListProjectBranchDatabasesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DatabasesResponse JSONDefault *GeneralError }
func ParseListProjectBranchDatabasesResponse ¶
func ParseListProjectBranchDatabasesResponse(rsp *http.Response) (*ListProjectBranchDatabasesResponse, error)
ParseListProjectBranchDatabasesResponse parses an HTTP response from a ListProjectBranchDatabasesWithResponse call
func (ListProjectBranchDatabasesResponse) Status ¶
func (r ListProjectBranchDatabasesResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectBranchDatabasesResponse) StatusCode ¶
func (r ListProjectBranchDatabasesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectBranchEndpointsResponse ¶
type ListProjectBranchEndpointsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointsResponse JSONDefault *GeneralError }
func ParseListProjectBranchEndpointsResponse ¶
func ParseListProjectBranchEndpointsResponse(rsp *http.Response) (*ListProjectBranchEndpointsResponse, error)
ParseListProjectBranchEndpointsResponse parses an HTTP response from a ListProjectBranchEndpointsWithResponse call
func (ListProjectBranchEndpointsResponse) Status ¶
func (r ListProjectBranchEndpointsResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectBranchEndpointsResponse) StatusCode ¶
func (r ListProjectBranchEndpointsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectBranchRolesResponse ¶
type ListProjectBranchRolesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RolesResponse JSONDefault *GeneralError }
func ParseListProjectBranchRolesResponse ¶
func ParseListProjectBranchRolesResponse(rsp *http.Response) (*ListProjectBranchRolesResponse, error)
ParseListProjectBranchRolesResponse parses an HTTP response from a ListProjectBranchRolesWithResponse call
func (ListProjectBranchRolesResponse) Status ¶
func (r ListProjectBranchRolesResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectBranchRolesResponse) StatusCode ¶
func (r ListProjectBranchRolesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectBranchesResponse ¶
type ListProjectBranchesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BranchesResponse JSONDefault *GeneralError }
func ParseListProjectBranchesResponse ¶
func ParseListProjectBranchesResponse(rsp *http.Response) (*ListProjectBranchesResponse, error)
ParseListProjectBranchesResponse parses an HTTP response from a ListProjectBranchesWithResponse call
func (ListProjectBranchesResponse) Status ¶
func (r ListProjectBranchesResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectBranchesResponse) StatusCode ¶
func (r ListProjectBranchesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectEndpointsResponse ¶
type ListProjectEndpointsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointsResponse JSONDefault *GeneralError }
func ParseListProjectEndpointsResponse ¶
func ParseListProjectEndpointsResponse(rsp *http.Response) (*ListProjectEndpointsResponse, error)
ParseListProjectEndpointsResponse parses an HTTP response from a ListProjectEndpointsWithResponse call
func (ListProjectEndpointsResponse) Status ¶
func (r ListProjectEndpointsResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectEndpointsResponse) StatusCode ¶
func (r ListProjectEndpointsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectOperationsParams ¶
type ListProjectOperationsParams struct { // Cursor Specify the cursor value from the previous response to get the next batch of operations Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` // Limit Specify a value from 1 to 1000 to limit number of operations in the response Limit *int `form:"limit,omitempty" json:"limit,omitempty"` }
ListProjectOperationsParams defines parameters for ListProjectOperations.
type ListProjectOperationsResponse ¶
type ListProjectOperationsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Operations []Operation `json:"operations"` // Pagination Cursor based pagination is used. The user must pass the cursor as is to the backend. // For more information about cursor based pagination, see // https://learn.microsoft.com/en-us/ef/core/querying/pagination#keyset-pagination Pagination *Pagination `json:"pagination,omitempty"` } JSONDefault *GeneralError }
func ParseListProjectOperationsResponse ¶
func ParseListProjectOperationsResponse(rsp *http.Response) (*ListProjectOperationsResponse, error)
ParseListProjectOperationsResponse parses an HTTP response from a ListProjectOperationsWithResponse call
func (ListProjectOperationsResponse) Status ¶
func (r ListProjectOperationsResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectOperationsResponse) StatusCode ¶
func (r ListProjectOperationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProjectsParams ¶
type ListProjectsParams struct { // Cursor Specify the cursor value from the previous response to get the next batch of projects. Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` // Limit Specify a value from 1 to 100 to limit number of projects in the response. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` }
ListProjectsParams defines parameters for ListProjects.
type ListProjectsResponse ¶
type ListProjectsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { // Pagination Cursor based pagination is used. The user must pass the cursor as is to the backend. // For more information about cursor based pagination, see // https://learn.microsoft.com/en-us/ef/core/querying/pagination#keyset-pagination Pagination *Pagination `json:"pagination,omitempty"` Projects []ProjectListItem `json:"projects"` } JSONDefault *GeneralError }
func ParseListProjectsResponse ¶
func ParseListProjectsResponse(rsp *http.Response) (*ListProjectsResponse, error)
ParseListProjectsResponse parses an HTTP response from a ListProjectsWithResponse call
func (ListProjectsResponse) Status ¶
func (r ListProjectsResponse) Status() string
Status returns HTTPResponse.Status
func (ListProjectsResponse) StatusCode ¶
func (r ListProjectsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Operation ¶
type Operation struct { // Action The action performed by the operation Action OperationAction `json:"action"` // BranchId The branch ID BranchId *string `json:"branch_id,omitempty"` // CreatedAt A timestamp indicating when the operation was created CreatedAt time.Time `json:"created_at"` // EndpointId The endpoint ID EndpointId *string `json:"endpoint_id,omitempty"` // Error The error that occured Error *string `json:"error,omitempty"` // FailuresCount The number of times the operation failed FailuresCount int32 `json:"failures_count"` // Id The operation ID Id openapi_types.UUID `json:"id"` // ProjectId The Neon project ID ProjectId string `json:"project_id"` // RetryAt A timestamp indicating when the operation was last retried RetryAt *time.Time `json:"retry_at,omitempty"` // Status The status of the operation Status OperationStatus `json:"status"` // UpdatedAt A timestamp indicating when the operation status was last updated UpdatedAt time.Time `json:"updated_at"` }
Operation defines model for Operation.
type OperationAction ¶
type OperationAction string
OperationAction The action performed by the operation
const ( ApplyConfig OperationAction = "apply_config" ApplyStorageConfig OperationAction = "apply_storage_config" CheckAvailability OperationAction = "check_availability" CreateBranch OperationAction = "create_branch" CreateCompute OperationAction = "create_compute" CreateTimeline OperationAction = "create_timeline" DeleteTimeline OperationAction = "delete_timeline" DisableMaintenance OperationAction = "disable_maintenance" ReplaceSafekeeper OperationAction = "replace_safekeeper" StartCompute OperationAction = "start_compute" SuspendCompute OperationAction = "suspend_compute" TenantAttach OperationAction = "tenant_attach" TenantDetach OperationAction = "tenant_detach" TenantIgnore OperationAction = "tenant_ignore" TenantReattach OperationAction = "tenant_reattach" )
Defines values for OperationAction.
type OperationResponse ¶
type OperationResponse struct {
Operation Operation `json:"operation"`
}
OperationResponse defines model for OperationResponse.
type OperationStatus ¶
type OperationStatus string
OperationStatus The status of the operation
const ( Failed OperationStatus = "failed" Finished OperationStatus = "finished" Running OperationStatus = "running" Scheduling OperationStatus = "scheduling" )
Defines values for OperationStatus.
type OperationsResponse ¶
type OperationsResponse struct {
Operations []Operation `json:"operations"`
}
OperationsResponse defines model for OperationsResponse.
type Pagination ¶
type Pagination struct {
Cursor string `json:"cursor"`
}
Pagination Cursor based pagination is used. The user must pass the cursor as is to the backend. For more information about cursor based pagination, see https://learn.microsoft.com/en-us/ef/core/querying/pagination#keyset-pagination
type PaginationResponse ¶
type PaginationResponse struct { // Pagination Cursor based pagination is used. The user must pass the cursor as is to the backend. // For more information about cursor based pagination, see // https://learn.microsoft.com/en-us/ef/core/querying/pagination#keyset-pagination Pagination *Pagination `json:"pagination,omitempty"` }
PaginationResponse defines model for PaginationResponse.
type PgSettingsData ¶
PgSettingsData A raw representation of PostgreSQL settings
type PgVersion ¶
type PgVersion = int
PgVersion The major PostgreSQL version number. Currently supported version are `14` and `15`.
type Project ¶
type Project struct { // ActiveTimeSeconds Seconds. Control plane observed endpoints of this project being active this amount of wall-clock time. // The value has some lag. // The value is reset at the beginning of each billing period. ActiveTimeSeconds int64 `json:"active_time_seconds"` // BranchLogicalSizeLimit The logical size limit for a branch. The value is in MiB. BranchLogicalSizeLimit int64 `json:"branch_logical_size_limit"` // BranchLogicalSizeLimitBytes The logical size limit for a branch. The value is in B. BranchLogicalSizeLimitBytes int64 `json:"branch_logical_size_limit_bytes"` // ComputeTimeSeconds Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted. // The value has some lag. The value is reset at the beginning of each billing period. // Examples: // 1. An endpoint that uses 1 CPU for 1 second is equal to `compute_time=1`. // 2. An endpoint that uses 2 CPUs simultaneously for 1 second is equal to `compute_time=2`. ComputeTimeSeconds int64 `json:"compute_time_seconds"` // ConsumptionPeriodEnd A date-time indicating when Neon Cloud plans to stop measuring consumption for current consumption period. ConsumptionPeriodEnd time.Time `json:"consumption_period_end"` // ConsumptionPeriodStart A date-time indicating when Neon Cloud started measuring consumption for current consumption period. ConsumptionPeriodStart time.Time `json:"consumption_period_start"` // CpuUsedSec DEPRECATED, use compute_time instead. // Deprecated: CpuUsedSec int64 `json:"cpu_used_sec"` // CreatedAt A timestamp indicating when the project was created CreatedAt time.Time `json:"created_at"` // CreationSource The project creation source CreationSource string `json:"creation_source"` // DataStorageBytesHour Bytes-Hour. Project consumed that much storage hourly during the billing period. The value has some lag. // The value is reset at the beginning of each billing period. DataStorageBytesHour int64 `json:"data_storage_bytes_hour"` // DataTransferBytes Bytes. Egress traffic from the Neon cloud to the client for given project over the billing period. // Includes deleted endpoints. The value has some lag. The value is reset at the beginning of each billing period. DataTransferBytes int64 `json:"data_transfer_bytes"` // DefaultEndpointSettings A collection of settings for a Neon endpoint DefaultEndpointSettings *DefaultEndpointSettings `json:"default_endpoint_settings,omitempty"` // HistoryRetentionSeconds The number of seconds to retain point-in-time restore (PITR) backup history for this project. HistoryRetentionSeconds int64 `json:"history_retention_seconds"` // Id The project ID Id string `json:"id"` // MaintenanceStartsAt A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time. MaintenanceStartsAt *time.Time `json:"maintenance_starts_at,omitempty"` // Name The project name Name string `json:"name"` Owner *ProjectOwnerData `json:"owner,omitempty"` OwnerId string `json:"owner_id"` // PgVersion The major PostgreSQL version number. Currently supported version are `14` and `15`. PgVersion PgVersion `json:"pg_version"` // PlatformId The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`. PlatformId string `json:"platform_id"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner Provisioner `json:"provisioner"` // ProxyHost The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`). ProxyHost string `json:"proxy_host"` // QuotaResetAt DEPRECATED. Use `consumption_period_end` from the getProject endpoint instead. // A timestamp indicating when the project quota resets // Deprecated: QuotaResetAt *time.Time `json:"quota_reset_at,omitempty"` // RegionId The region identifier RegionId string `json:"region_id"` Settings *ProjectSettingsData `json:"settings,omitempty"` // StorePasswords Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. StorePasswords bool `json:"store_passwords"` // SyntheticStorageSize Experimental. Do not use this field yet. // The data storage size in bytes. SyntheticStorageSize *int64 `json:"synthetic_storage_size,omitempty"` // UpdatedAt A timestamp indicating when the project was last updated UpdatedAt time.Time `json:"updated_at"` // WrittenDataBytes Bytes. Amount of WAL that travelled through storage for given project across all branches. // The value has some lag. The value is reset at the beginning of each billing period. WrittenDataBytes int64 `json:"written_data_bytes"` }
Project defines model for Project.
type ProjectCreateRequest ¶
type ProjectCreateRequest struct { Project struct { AutoscalingLimitMaxCu *ComputeUnit `json:"autoscaling_limit_max_cu,omitempty"` AutoscalingLimitMinCu *ComputeUnit `json:"autoscaling_limit_min_cu,omitempty"` Branch *struct { // DatabaseName The database name. If not specified, the default database name will be used. DatabaseName *string `json:"database_name,omitempty"` // Name The branch name. If not specified, the default branch name will be used. Name *string `json:"name,omitempty"` // RoleName The role name. If not specified, the default role name will be used. RoleName *string `json:"role_name,omitempty"` } `json:"branch,omitempty"` // DefaultEndpointSettings A collection of settings for a Neon endpoint DefaultEndpointSettings *DefaultEndpointSettings `json:"default_endpoint_settings,omitempty"` // HistoryRetentionSeconds The number of seconds to retain the point-in-time restore (PITR) backup history for this project. // The default is 604800 seconds (7 days). HistoryRetentionSeconds *int64 `json:"history_retention_seconds,omitempty"` // Name The project name Name *string `json:"name,omitempty"` // PgVersion The major PostgreSQL version number. Currently supported version are `14` and `15`. PgVersion *PgVersion `json:"pg_version,omitempty"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner *Provisioner `json:"provisioner,omitempty"` // RegionId The region identifier. Refer to our [Regions](https://neon.tech/docs/introduction/regions) documentation for supported regions. Values are specified in this format: `aws-us-east-1` RegionId *string `json:"region_id,omitempty"` Settings *ProjectSettingsData `json:"settings,omitempty"` // StorePasswords Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. StorePasswords *bool `json:"store_passwords,omitempty"` } `json:"project"` }
ProjectCreateRequest defines model for ProjectCreateRequest.
type ProjectListItem ¶
type ProjectListItem struct { // ActiveTime Control plane observed endpoints of this project being active this amount of wall-clock time. ActiveTime int64 `json:"active_time"` // BranchLogicalSizeLimit The logical size limit for a branch. The value is in MiB. BranchLogicalSizeLimit int64 `json:"branch_logical_size_limit"` // BranchLogicalSizeLimitBytes The logical size limit for a branch. The value is in B. BranchLogicalSizeLimitBytes int64 `json:"branch_logical_size_limit_bytes"` // CpuUsedSec DEPRECATED, use data from the getProject endpoint instead. // Deprecated: CpuUsedSec int64 `json:"cpu_used_sec"` // CreatedAt A timestamp indicating when the project was created CreatedAt time.Time `json:"created_at"` // CreationSource The project creation source CreationSource string `json:"creation_source"` // DefaultEndpointSettings A collection of settings for a Neon endpoint DefaultEndpointSettings *DefaultEndpointSettings `json:"default_endpoint_settings,omitempty"` // Id The project ID Id string `json:"id"` // MaintenanceStartsAt A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time. MaintenanceStartsAt *time.Time `json:"maintenance_starts_at,omitempty"` // Name The project name Name string `json:"name"` OwnerId string `json:"owner_id"` // PgVersion The major PostgreSQL version number. Currently supported version are `14` and `15`. PgVersion PgVersion `json:"pg_version"` // PlatformId The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`. PlatformId string `json:"platform_id"` // Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling. Provisioner Provisioner `json:"provisioner"` // ProxyHost The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`). ProxyHost string `json:"proxy_host"` // QuotaResetAt DEPRECATED. Use `consumption_period_end` from the getProject endpoint instead. // A timestamp indicating when the project quota resets // Deprecated: QuotaResetAt *time.Time `json:"quota_reset_at,omitempty"` // RegionId The region identifier RegionId string `json:"region_id"` Settings *ProjectSettingsData `json:"settings,omitempty"` // StorePasswords Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. StorePasswords bool `json:"store_passwords"` // SyntheticStorageSize Experimental. Do not use this field yet. // The data storage size in bytes. SyntheticStorageSize *int64 `json:"synthetic_storage_size,omitempty"` // UpdatedAt A timestamp indicating when the project was last updated UpdatedAt time.Time `json:"updated_at"` }
ProjectListItem Essential data about the project. Full data is available at the getProject endpoint.
type ProjectOperations ¶
type ProjectOperations struct { Operations []Operation `json:"operations"` Project Project `json:"project"` }
ProjectOperations defines model for ProjectOperations.
type ProjectOwnerData ¶
type ProjectOwnerData struct { BranchesLimit int `json:"branches_limit"` Email string `json:"email"` // SubscriptionType Type of subscription to Neon Cloud. // Notice that for users without billing account this will be "UNKNOWN" SubscriptionType BillingSubscriptionType `json:"subscription_type"` }
ProjectOwnerData defines model for ProjectOwnerData.
type ProjectQuota ¶
type ProjectQuota struct { // ActiveTimeSeconds The total amount of wall-clock time allowed to be spent by the project's compute endpoints. ActiveTimeSeconds *int64 `json:"active_time_seconds,omitempty"` // ComputeTimeSeconds The total amount of CPU seconds allowed to be spent by the project's compute endpoints. ComputeTimeSeconds *int64 `json:"compute_time_seconds,omitempty"` // DataTransferBytes Total amount of data transferred from all of a project's branches using the proxy. DataTransferBytes *int64 `json:"data_transfer_bytes,omitempty"` // LogicalSizeBytes Limit on the logical size of every project's branch. LogicalSizeBytes *int64 `json:"logical_size_bytes,omitempty"` // WrittenDataBytes Total amount of data written to all of a project's branches. WrittenDataBytes *int64 `json:"written_data_bytes,omitempty"` }
ProjectQuota Per-project consumption quota. If the quota is exceeded, all active computes are automatically suspended and it will not be possible to start them with an API method call or incoming proxy connections. The only exception is `logical_size_bytes`, which is applied on per-branch basis, i.e., only the compute on the branch that exceeds the `logical_size` quota will be suspended.
Quotas are enforced based on per-project consumption metrics with the same names, which are reset at the end of each billing period (the first day of the month). Logical size is also an exception in this case, as it represents the total size of data stored in a branch, so it is not reset.
A zero or empty quota value means 'unlimited'.
type ProjectResponse ¶
type ProjectResponse struct {
Project Project `json:"project"`
}
ProjectResponse defines model for ProjectResponse.
type ProjectSettingsData ¶
type ProjectSettingsData struct { // Quota Per-project consumption quota. If the quota is exceeded, all active computes // are automatically suspended and it will not be possible to start them with // an API method call or incoming proxy connections. The only exception is // `logical_size_bytes`, which is applied on per-branch basis, i.e., only the // compute on the branch that exceeds the `logical_size` quota will be suspended. // // Quotas are enforced based on per-project consumption metrics with the same names, // which are reset at the end of each billing period (the first day of the month). // Logical size is also an exception in this case, as it represents the total size // of data stored in a branch, so it is not reset. // // A zero or empty quota value means 'unlimited'. Quota *ProjectQuota `json:"quota,omitempty"` }
ProjectSettingsData defines model for ProjectSettingsData.
type ProjectUpdateRequest ¶
type ProjectUpdateRequest struct { Project struct { // DefaultEndpointSettings A collection of settings for a Neon endpoint DefaultEndpointSettings *DefaultEndpointSettings `json:"default_endpoint_settings,omitempty"` // HistoryRetentionSeconds The number of seconds to retain the point-in-time restore (PITR) backup history for this project. // The default is 604800 seconds (7 days). HistoryRetentionSeconds *int64 `json:"history_retention_seconds,omitempty"` // Name The project name Name *string `json:"name,omitempty"` Settings *ProjectSettingsData `json:"settings,omitempty"` } `json:"project"` }
ProjectUpdateRequest defines model for ProjectUpdateRequest.
type ProjectsResponse ¶
type ProjectsResponse struct {
Projects []ProjectListItem `json:"projects"`
}
ProjectsResponse defines model for ProjectsResponse.
type Provisioner ¶
type Provisioner string
Provisioner The Neon compute provisioner. Select the `k8s-neonvm` provisioner to enable autoscaling.
const ( K8sNeonvm Provisioner = "k8s-neonvm" K8sPod Provisioner = "k8s-pod" )
Defines values for Provisioner.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResetProjectBranchRolePasswordResponse ¶
type ResetProjectBranchRolePasswordResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RoleOperations JSONDefault *GeneralError }
func ParseResetProjectBranchRolePasswordResponse ¶
func ParseResetProjectBranchRolePasswordResponse(rsp *http.Response) (*ResetProjectBranchRolePasswordResponse, error)
ParseResetProjectBranchRolePasswordResponse parses an HTTP response from a ResetProjectBranchRolePasswordWithResponse call
func (ResetProjectBranchRolePasswordResponse) Status ¶
func (r ResetProjectBranchRolePasswordResponse) Status() string
Status returns HTTPResponse.Status
func (ResetProjectBranchRolePasswordResponse) StatusCode ¶
func (r ResetProjectBranchRolePasswordResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RevokeApiKeyResponse ¶
type RevokeApiKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ApiKeyRevokeResponse JSONDefault *GeneralError }
func ParseRevokeApiKeyResponse ¶
func ParseRevokeApiKeyResponse(rsp *http.Response) (*RevokeApiKeyResponse, error)
ParseRevokeApiKeyResponse parses an HTTP response from a RevokeApiKeyWithResponse call
func (RevokeApiKeyResponse) Status ¶
func (r RevokeApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeApiKeyResponse) StatusCode ¶
func (r RevokeApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Role ¶
type Role struct { // BranchId The ID of the branch to which the role belongs BranchId string `json:"branch_id"` // CreatedAt A timestamp indicating when the role was created CreatedAt time.Time `json:"created_at"` // Name The role name Name string `json:"name"` // Password The role password Password *string `json:"password,omitempty"` // Protected Whether or not the role is system-protected Protected *bool `json:"protected,omitempty"` // UpdatedAt A timestamp indicating when the role was last updated UpdatedAt time.Time `json:"updated_at"` }
Role defines model for Role.
type RoleCreateRequest ¶
type RoleCreateRequest struct { Role struct { // Name The role name. Cannot exceed 63 bytes in length. Name string `json:"name"` } `json:"role"` }
RoleCreateRequest defines model for RoleCreateRequest.
type RoleOperations ¶
RoleOperations defines model for RoleOperations.
type RolePasswordResponse ¶
type RolePasswordResponse struct { // Password The role password Password string `json:"password"` }
RolePasswordResponse defines model for RolePasswordResponse.
type RoleResponse ¶
type RoleResponse struct {
Role Role `json:"role"`
}
RoleResponse defines model for RoleResponse.
type RolesResponse ¶
type RolesResponse struct {
Roles []Role `json:"roles"`
}
RolesResponse defines model for RolesResponse.
type SetPrimaryProjectBranchResponse ¶
type SetPrimaryProjectBranchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BranchOperations JSONDefault *GeneralError }
func ParseSetPrimaryProjectBranchResponse ¶
func ParseSetPrimaryProjectBranchResponse(rsp *http.Response) (*SetPrimaryProjectBranchResponse, error)
ParseSetPrimaryProjectBranchResponse parses an HTTP response from a SetPrimaryProjectBranchWithResponse call
func (SetPrimaryProjectBranchResponse) Status ¶
func (r SetPrimaryProjectBranchResponse) Status() string
Status returns HTTPResponse.Status
func (SetPrimaryProjectBranchResponse) StatusCode ¶
func (r SetPrimaryProjectBranchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StartProjectEndpointResponse ¶
type StartProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointOperations JSONDefault *GeneralError }
func ParseStartProjectEndpointResponse ¶
func ParseStartProjectEndpointResponse(rsp *http.Response) (*StartProjectEndpointResponse, error)
ParseStartProjectEndpointResponse parses an HTTP response from a StartProjectEndpointWithResponse call
func (StartProjectEndpointResponse) Status ¶
func (r StartProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (StartProjectEndpointResponse) StatusCode ¶
func (r StartProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SuspendProjectEndpointResponse ¶
type SuspendProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointOperations JSONDefault *GeneralError }
func ParseSuspendProjectEndpointResponse ¶
func ParseSuspendProjectEndpointResponse(rsp *http.Response) (*SuspendProjectEndpointResponse, error)
ParseSuspendProjectEndpointResponse parses an HTTP response from a SuspendProjectEndpointWithResponse call
func (SuspendProjectEndpointResponse) Status ¶
func (r SuspendProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (SuspendProjectEndpointResponse) StatusCode ¶
func (r SuspendProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SuspendTimeoutSeconds ¶
type SuspendTimeoutSeconds = int64
SuspendTimeoutSeconds Duration of inactivity in seconds after which the cimpute endpoint is automatically suspended. The value `0` means use the global default. The value `-1` means never suspend. The default value is `300` seconds (5 minutes). The maximum value is `604800` seconds (1 week). For more information, see [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration).
type UpdateProjectBranchDatabaseJSONRequestBody ¶
type UpdateProjectBranchDatabaseJSONRequestBody = DatabaseUpdateRequest
UpdateProjectBranchDatabaseJSONRequestBody defines body for UpdateProjectBranchDatabase for application/json ContentType.
type UpdateProjectBranchDatabaseResponse ¶
type UpdateProjectBranchDatabaseResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DatabaseOperations JSONDefault *GeneralError }
func ParseUpdateProjectBranchDatabaseResponse ¶
func ParseUpdateProjectBranchDatabaseResponse(rsp *http.Response) (*UpdateProjectBranchDatabaseResponse, error)
ParseUpdateProjectBranchDatabaseResponse parses an HTTP response from a UpdateProjectBranchDatabaseWithResponse call
func (UpdateProjectBranchDatabaseResponse) Status ¶
func (r UpdateProjectBranchDatabaseResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProjectBranchDatabaseResponse) StatusCode ¶
func (r UpdateProjectBranchDatabaseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateProjectBranchJSONRequestBody ¶
type UpdateProjectBranchJSONRequestBody = BranchUpdateRequest
UpdateProjectBranchJSONRequestBody defines body for UpdateProjectBranch for application/json ContentType.
type UpdateProjectBranchResponse ¶
type UpdateProjectBranchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BranchOperations JSONDefault *GeneralError }
func ParseUpdateProjectBranchResponse ¶
func ParseUpdateProjectBranchResponse(rsp *http.Response) (*UpdateProjectBranchResponse, error)
ParseUpdateProjectBranchResponse parses an HTTP response from a UpdateProjectBranchWithResponse call
func (UpdateProjectBranchResponse) Status ¶
func (r UpdateProjectBranchResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProjectBranchResponse) StatusCode ¶
func (r UpdateProjectBranchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateProjectEndpointJSONRequestBody ¶
type UpdateProjectEndpointJSONRequestBody = EndpointUpdateRequest
UpdateProjectEndpointJSONRequestBody defines body for UpdateProjectEndpoint for application/json ContentType.
type UpdateProjectEndpointResponse ¶
type UpdateProjectEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *EndpointOperations JSONDefault *GeneralError }
func ParseUpdateProjectEndpointResponse ¶
func ParseUpdateProjectEndpointResponse(rsp *http.Response) (*UpdateProjectEndpointResponse, error)
ParseUpdateProjectEndpointResponse parses an HTTP response from a UpdateProjectEndpointWithResponse call
func (UpdateProjectEndpointResponse) Status ¶
func (r UpdateProjectEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProjectEndpointResponse) StatusCode ¶
func (r UpdateProjectEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateProjectJSONRequestBody ¶
type UpdateProjectJSONRequestBody = ProjectUpdateRequest
UpdateProjectJSONRequestBody defines body for UpdateProject for application/json ContentType.
type UpdateProjectResponse ¶
type UpdateProjectResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProjectOperations JSONDefault *GeneralError }
func ParseUpdateProjectResponse ¶
func ParseUpdateProjectResponse(rsp *http.Response) (*UpdateProjectResponse, error)
ParseUpdateProjectResponse parses an HTTP response from a UpdateProjectWithResponse call
func (UpdateProjectResponse) Status ¶
func (r UpdateProjectResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProjectResponse) StatusCode ¶
func (r UpdateProjectResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode