mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 00:36:38 +00:00
rename domain type
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
package domain
|
||||
|
||||
type DomainType string
|
||||
type Type string
|
||||
|
||||
const (
|
||||
TypeFree DomainType = "free"
|
||||
TypeCustom DomainType = "custom"
|
||||
TypeFree Type = "free"
|
||||
TypeCustom Type = "custom"
|
||||
)
|
||||
|
||||
type Domain struct {
|
||||
ID string `gorm:"unique;primaryKey;autoIncrement"`
|
||||
Domain string `gorm:"unique"` // Domain records must be unique, this avoids domain reuse across accounts.
|
||||
AccountID string `gorm:"index"`
|
||||
TargetCluster string // The proxy cluster this domain should be validated against
|
||||
Type DomainType `gorm:"-"`
|
||||
ID string `gorm:"unique;primaryKey;autoIncrement"`
|
||||
Domain string `gorm:"unique"` // Domain records must be unique, this avoids domain reuse across accounts.
|
||||
AccountID string `gorm:"index"`
|
||||
TargetCluster string // The proxy cluster this domain should be validated against
|
||||
Type Type `gorm:"-"`
|
||||
Validated bool
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func RegisterEndpoints(router *mux.Router, manager Manager) {
|
||||
router.HandleFunc("/domains/{domainId}/validate", h.triggerCustomDomainValidation).Methods("GET", "OPTIONS")
|
||||
}
|
||||
|
||||
func domainTypeToApi(t domain.DomainType) api.ReverseProxyDomainType {
|
||||
func domainTypeToApi(t domain.Type) api.ReverseProxyDomainType {
|
||||
switch t {
|
||||
case domain.TypeCustom:
|
||||
return api.ReverseProxyDomainTypeCustom
|
||||
|
||||
Reference in New Issue
Block a user