mirror of
https://github.com/labring/sealos.git
synced 2026-11-03 20:53:57 +08:00
40 lines
1.4 KiB
Go
40 lines
1.4 KiB
Go
// Copyright © 2023 sealos.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
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"`
|
|
}
|