skibish / ddns

Personal DDNS client with Digital Ocean Networking DNS as backend.
MIT License
254 stars 24 forks source link

TTL support #20

Closed M96268004 closed 3 years ago

M96268004 commented 3 years ago

Hi there,

The V2 API supporting TTL value now https://developers.digitalocean.com/documentation/v2/#domain-records

Would like to know if I want to have TTL, the do.go file should be modified right?

Thanks,

skibish commented 3 years ago

Hi @M96268004 ,

Thanks for noting that TTL is now available!

You are right! You need to add TTL to the Record struct.

https://github.com/skibish/ddns/blob/e5b7ce5ca5ffb7ad8d67da7c6c863e2132944780/do/do.go#L22-L27

After this you will be able to specify it in configuration like this:

records:
  - type: "A"
    name: "www"
    ttl: 1800
M96268004 commented 3 years ago

Hi @skibish

Well noted and thanks for reply.