Something went wrong. Try again.
My PaaS for hosting multiple elasticsearch clusters in a Kubernetes environment.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305// Package api provides primitives to interact with the openapi HTTP API.//// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.package api
import ( "time")
// Defines values for AuthResponseRole.const ( Admin AuthResponseRole = "admin" Default AuthResponseRole = "default")
// Valid indicates whether the value is a known member of the AuthResponseRole enum.func (e AuthResponseRole) Valid() bool { switch e { case Admin: return true case Default: return true default: return false }}
// Defines values for InstanceHealth.const ( Green InstanceHealth = "green" Red InstanceHealth = "red" Unknown InstanceHealth = "unknown" Yellow InstanceHealth = "yellow")
// Valid indicates whether the value is a known member of the InstanceHealth enum.func (e InstanceHealth) Valid() bool { switch e { case Green: return true case Red: return true case Unknown: return true case Yellow: return true default: return false }}
// Defines values for InstanceStatus.const ( Creating InstanceStatus = "creating" Degraded InstanceStatus = "degraded" Deleting InstanceStatus = "deleting" Failed InstanceStatus = "failed" Pending InstanceStatus = "pending" Ready InstanceStatus = "ready")
// Valid indicates whether the value is a known member of the InstanceStatus enum.func (e InstanceStatus) Valid() bool { switch e { case Creating: return true case Degraded: return true case Deleting: return true case Failed: return true case Pending: return true case Ready: return true default: return false }}
// Defines values for LogEntryOperation.const ( CreateInstance LogEntryOperation = "create_instance" DeleteDoc LogEntryOperation = "delete_doc" DeleteInstance LogEntryOperation = "delete_instance" GetInstance LogEntryOperation = "get_instance" IndexDoc LogEntryOperation = "index_doc" ListIndices LogEntryOperation = "list_indices" ListInstances LogEntryOperation = "list_instances" SearchDocs LogEntryOperation = "search_docs")
// Valid indicates whether the value is a known member of the LogEntryOperation enum.func (e LogEntryOperation) Valid() bool { switch e { case CreateInstance: return true case DeleteDoc: return true case DeleteInstance: return true case GetInstance: return true case IndexDoc: return true case ListIndices: return true case ListInstances: return true case SearchDocs: return true default: return false }}
// Defines values for LogEntryStatus.const ( Failure LogEntryStatus = "failure" Success LogEntryStatus = "success")
// Valid indicates whether the value is a known member of the LogEntryStatus enum.func (e LogEntryStatus) Valid() bool { switch e { case Failure: return true case Success: return true default: return false }}
// AuthRequest defines model for AuthRequest.type AuthRequest struct { // InviteCode Invite code required when invite-only mode is enabled // // Example: sunset-rocket-42 InviteCode *string `json:"inviteCode,omitempty"`
// Password Example: s3cureP@ssw0rd Password string `json:"password"`
// Username Example: johndoe Username string `json:"username"`}
// AuthResponse defines model for AuthResponse.type AuthResponse struct { // Role Example: default Role AuthResponseRole `json:"role"`
// Token JWT access token Token string `json:"token"`}
// AuthResponseRole Example: defaulttype AuthResponseRole string
// Document defines model for Document.type Document struct { // DocumentId Document identifier DocumentId string `json:"documentId"`
// Index Index the document belongs to Index string `json:"index"`
// Score Relevance score from search Score *float64 `json:"score,omitempty"`
// Text Document text content Text string `json:"text"`}
// DocumentCreateRequest defines model for DocumentCreateRequest.type DocumentCreateRequest struct { // Index Target Elasticsearch index (defaults to 'default') // // Example: articles Index *string `json:"index,omitempty"`
// Text Text content to index // // Example: The quick brown fox jumps over the lazy dog Text string `json:"text"`}
// DocumentIndexResponse defines model for DocumentIndexResponse.type DocumentIndexResponse struct { // DocumentId Auto-generated document ID assigned by Elasticsearch DocumentId string `json:"documentId"`
// Index The index the document was stored in Index string `json:"index"`}
// IndexList defines model for IndexList.type IndexList struct { // Indices List of index names in the Elasticsearch instance Indices []string `json:"indices"`}
// Instance defines model for Instance.type Instance struct { CreatedAt time.Time `json:"createdAt"`
// Endpoint Internal cluster endpoint for the Elasticsearch cluster Endpoint *string `json:"endpoint,omitempty"` Health *InstanceHealth `json:"health,omitempty"`
// Id Unique identifier of the instance Id string `json:"id"`
// Name Kubernetes-compatible name of the Elasticsearch cluster Name string `json:"name"`
// NodeCount Number of Elasticsearch nodes deployed by the server NodeCount *int `json:"nodeCount,omitempty"` Status InstanceStatus `json:"status"`
// StorageSize Persistent volume claim size per node, managed by the server // // Example: 10Gi StorageSize *string `json:"storageSize,omitempty"` UpdatedAt time.Time `json:"updatedAt"`
// Version Elasticsearch version deployed by the server // // Example: 8.11.0 Version *string `json:"version,omitempty"`}
// InstanceHealth defines model for Instance.Health.type InstanceHealth string
// InstanceStatus defines model for Instance.Status.type InstanceStatus string
// InstanceCreateRequest defines model for InstanceCreateRequest.type InstanceCreateRequest struct { // InstanceId Kubernetes-compatible name for the Elasticsearch cluster. All other // configuration (version, node count, storage, etc.) is managed by the // server. InstanceId string `json:"instanceId"`}
// LogEntry defines model for LogEntry.type LogEntry struct { // Id Unique identifier of the log entry Id string `json:"id"`
// InstanceId Instance this log entry belongs to InstanceId string `json:"instanceId"`
// Message Human-readable summary of the operation Message string `json:"message"`
// Operation The operation that was performed Operation LogEntryOperation `json:"operation"`
// Status Whether the operation succeeded or failed Status LogEntryStatus `json:"status"`
// Timestamp When the operation occurred Timestamp time.Time `json:"timestamp"`
// Username User who performed the operation Username string `json:"username"`}
// LogEntryOperation The operation that was performedtype LogEntryOperation string
// LogEntryStatus Whether the operation succeeded or failedtype LogEntryStatus string
// SearchDocsParams defines parameters for SearchDocs.type SearchDocsParams struct { // Q Search query string Q string `form:"q" json:"q"`
// Index Index to search in (defaults to 'default') Index *string `form:"index,omitempty" json:"index,omitempty"`}
// DeleteDocParams defines parameters for DeleteDoc.type DeleteDocParams struct { // Index Index the document belongs to (defaults to 'default') Index string `form:"index" json:"index"`}
// LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.type LoginUserJSONRequestBody = AuthRequest
// RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType.type RegisterUserJSONRequestBody = AuthRequest
// CreateInstanceJSONRequestBody defines body for CreateInstance for application/json ContentType.type CreateInstanceJSONRequestBody = InstanceCreateRequest
// IndexDocJSONRequestBody defines body for IndexDoc for application/json ContentType.type IndexDocJSONRequestBody = DocumentCreateRequest