Files
sealos/controllers/db/bytebase/client/api/data_source.go
T
Yun Pan 9725dedb5d add bytebase controller (#2841)
* 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
2023-04-03 23:13:46 +08:00

26 lines
795 B
Go

package api
// DataSourceType is the type for data source.
type DataSourceType string
const (
// DataSourceAdmin is the ADMIN type of data source.
DataSourceAdmin DataSourceType = "ADMIN"
// DataSourceRO is the read-only type of data source.
DataSourceRO DataSourceType = "READ_ONLY"
)
// DataSourceMessage is the API message for a data source.
type DataSourceMessage struct {
Title string `json:"title"`
Type DataSourceType `json:"type"`
Username string `json:"username"`
Password string `json:"password"`
SslCa string `json:"sslCa"`
SslCert string `json:"sslCert"`
SslKey string `json:"sslKey"`
Host string `json:"host"`
Port string `json:"port"`
Database string `json:"database"`
}