mirror of
https://github.com/labring/sealos.git
synced 2026-11-05 08:22:41 +08:00
* add bytebase controller lock kubernetes version to v1.25 fix ingress and rbac remove hard-coding in some files and remove unnecessary yaml fields fix go linting * add README.md and provide sample CR * use fmt.Sprintf for better readability * fix golangci-lint fix golangci-lint 2 fix golangci-lint - 3 * add default request and limit for container - in order to be compliant to ResourceQuota * make log more verbose with namespaced name * make bytebase available in frame by modifying x-frame-option header * several login and sign-up improvements - save default email and password for one reconciler - add CheckUserExist to avoid signing up again - clean up the code * several login and signup improvements - 2 - rewrite NewClient * add a way to generate deploy yaml for controller * add BytebaseControllerConfig - user can now configure their RootDomain, SecretName, SecretNamespace - remove hardcode in Nginx configuration snippet * add BytebaseControllerConfig - 2 * bytebase controller v2 - use multiple groups - user can now modify secret, secretNamespace and rootDomain * fix golang-ci lint * avoid setting password when generating it failed * use ghcr.io instead of my own repo * revert version from v2 back to v1
48 lines
1.7 KiB
Go
48 lines
1.7 KiB
Go
package api
|
|
|
|
// check InstanceCreate
|
|
// ref: https://github.com/bytebase/bytebase/blob/cf5e0927a91c0c52ace4ff141c69875c2aa679c3/frontend/src/types/instance.ts#L91
|
|
type Instance struct {
|
|
// Related fields
|
|
EnvironmentID string `json:"environmentId"`
|
|
// Domain specific fields
|
|
Name string `json:"name"`
|
|
Engine EngineType `json:"engine"`
|
|
Host string `json:"host"`
|
|
ExternalLink string `json:"externalLink,omitempty"`
|
|
Port string `json:"port,omitempty"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
// InstanceMessage is the API message for an instance.
|
|
type InstanceMessage struct {
|
|
UID string `json:"uid"`
|
|
Name string `json:"name"`
|
|
State State `json:"state,omitempty"`
|
|
Title string `json:"title"`
|
|
Engine EngineType `json:"engine"`
|
|
ExternalLink string `json:"externalLink"`
|
|
DataSources []*DataSourceMessage `json:"dataSources"`
|
|
}
|
|
|
|
// InstancePatchMessage is the API message to patch the instance.
|
|
type InstancePatchMessage struct {
|
|
Title *string `json:"title,omitempty"`
|
|
ExternalLink *string `json:"externalLink,omitempty"`
|
|
DataSources []*DataSourceMessage `json:"dataSources,omitempty"`
|
|
}
|
|
|
|
// InstanceFindMessage is the API message for finding instance.
|
|
type InstanceFindMessage struct {
|
|
EnvironmentID string
|
|
InstanceID string
|
|
ShowDeleted bool
|
|
}
|
|
|
|
// ListInstanceMessage is the API message for list instance response.
|
|
type ListInstanceMessage struct {
|
|
Instances []*InstanceMessage `json:"instances"`
|
|
NextPageToken string `json:"nextPageToken"`
|
|
}
|