Documentation ¶
Overview ¶
Copyright 2018-2020 Wargaming.Net
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2023 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2020 Wargaming.Net ¶
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.
Copyright 2018-2023 Wargaming.Net ¶
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.
Index ¶
- Constants
- func EnableOrm()
- func NewConfig(configFile string)
- func Run()
- func SetLogLevel(loglevel int)
- type AMQPConfig
- type AuthData
- type AuthDatabase
- type AuthHeader
- type Command
- type Config
- type Domain
- type DomainPretty
- type DomainView
- type Logging
- type PSQLConfig
- type Permission
- type Record
- type RecordPretty
- type RecordType
- type RecordsApiTable
- type RecordsTable
- type RecordsType
- type VaultData
- type WunderReply
- type WunderRequest
Constants ¶
const ( LogFatal = iota LogError LogWarning LogInfo LogDebug LogTrace )
const DomainNameAny string = "*"
Variables ¶
This section is empty.
Functions ¶
func SetLogLevel ¶
func SetLogLevel(loglevel int)
Types ¶
type AMQPConfig ¶
type AuthData ¶
type AuthData struct { Token string Secret string Permissions []Permission Priority int // contains filtered or unexported fields }
type AuthDatabase ¶
type AuthHeader ¶
type Command ¶
type Command string
const ( CommandCreateDomain Command = "create_domain" CommandCreateRecord Command = "create_record" CommandDeleteRecord Command = "delete_record" CommandReplaceRecord Command = "replace_record" CommandListRecords Command = "list_records" CommandListOwn Command = "list_own" CommandListDomains Command = "list_domains" CommandSearchRecord Command = "search_record" CommandReplaceOwner Command = "replace_owner" CommandAny Command = "*" )
type Config ¶
type Config struct { AMQPConfigs []*AMQPConfig PSQLConfigs []*PSQLConfig Auth *AuthDatabase Vault *VaultData }
type Domain ¶
type Domain struct { Name string `json:"n"` View DomainView `json:"v"` }
type DomainPretty ¶
type DomainPretty struct { Name string `json:"name"` View DomainView `json:"type"` }
type DomainView ¶
type DomainView string
const ( DomainViewPublic DomainView = "public" DomainViewPrivate DomainView = "private" DomainViewAny DomainView = "*" )
type PSQLConfig ¶
type Permission ¶
type Record ¶
type Record struct { Name string `json:"n"` Type RecordType `json:"t"` Data []string `json:"d"` TTL int `json:"l"` // contains filtered or unexported fields }
type RecordPretty ¶
type RecordPretty struct { Name string `json:"name"` Type RecordType `json:"type"` Data []string `json:"data"` TTL int `json:"ttl"` // contains filtered or unexported fields }
type RecordType ¶
type RecordType string
const ( RecordTypeA RecordType = "A" RecordTypeAAAA RecordType = "AAAA" RecordTypeCNAME RecordType = "CNAME" RecordTypeTXT RecordType = "TXT" RecordTypeSRV RecordType = "SRV" RecordTypeMX RecordType = "MX" RecordTypeNS RecordType = "NS" RecordTypePTR RecordType = "PTR" RecordTypeSOA RecordType = "SOA" )
type RecordsApiTable ¶
type RecordsApiTable struct { Id uint `gorm:"primaryKey"` DomainId uint `gorm:"column:domain_id"` Name string `gorm:"size:255;not null"` Type string `gorm:"size:10;not null"` Content string `gorm:"size:65535;not null"` Ttl *int Prio *int Disabled *bool Ordername *string `gorm:"size:255"` Auth *bool Owner *string `gorm:"size:255"` // contains filtered or unexported fields }
func (RecordsApiTable) TableName ¶
func (RecordsApiTable) TableName() string
type RecordsTable ¶
type RecordsTable struct { Id uint `gorm:"primaryKey"` DomainId uint `gorm:"column:domain_id"` Name string `gorm:"size:255;not null"` Type string `gorm:"size:10;not null"` Content string `gorm:"size:65535;not null"` Ttl *int Prio *int Disabled *bool Ordername *string `gorm:"size:255"` Auth *bool // contains filtered or unexported fields }
func (RecordsTable) TableName ¶
func (RecordsTable) TableName() string
type RecordsType ¶
type RecordsType []*Record
type WunderReply ¶
type WunderReply struct { Status string `json:"status"` Data interface{} `json:"data"` }
func ReturnError ¶
func ReturnError(err ...interface{}) *WunderReply
func ReturnSuccess ¶
func ReturnSuccess(data interface{}) *WunderReply