clients.namecom #
namecom
implementation
see https://www.name.com/api-docs/dns#ListRecords
then exporter for https://www.luadns.com/
To get started
import freeflowuniverse.crystallib.clients. namecom
mut client:= namecom.get()!
client...
example heroscript
!!namecom.configure
secret: '...'
host: 'localhost'
port: 8888
Constants #
const version = '0.0.0'
fn get #
fn get(args_ ArgsGet) !&NameComClient
fn heroscript_default #
fn heroscript_default() !string
Todo: THIS IS EXAMPLE CODE AND NEEDS TO BE CHANGED IN LINE TO STRUCT BELOW, IS STRUCTURED AS HEROSCRIPT
fn list_domains #
fn list_domains(username string, token string) !ListDomainsResponse
fn list_records #
fn list_records(domain_name string, username string, token string) !ListRecordsResponse
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for namecom
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string = 'default'
}
///////FACTORY
struct NameComClient #
struct NameComClient {
pub mut:
name string = 'default'
token string
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
struct PlayArgs #
@[params]
struct PlayArgs {
pub mut:
name string = 'default'
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
start bool
stop bool
restart bool
delete bool
configure bool // make sure there is at least one installed
}
struct Record #
struct Record {
pub:
id int
domain_name string @[json: 'domainName']
host string
fqdn string
type_ string @[json: 'type']
answer string
ttl int
priority ?int
}
fn (Record) write #
fn (r Record) write() !string