Coder Social home page Coder Social logo

bind-record-manager's Introduction

bind-record-manager

npm version

Nodejs module for Parse and Generate recordFile of Bind DNS. Manager system

Installation

Use the npm for install

npm install bind-record-manager --save

Support

The module developed for Bind9 system and support A, AAAA, SOA, MX, NS, TXT, SRV, CNAME records.

Usage

/*
   import module
*/
const RecordManager = require('bind-record-manager') 

/* 
   generate new manager without record File path if you want work
   with recordFile follow `new RecordManager(<RecordFilePath>)` 
*/
const manager = new RecordManager() 

/*
   Parse raw data, if you used <RecordFilePath> for generate manager
   You do not need to define {RawData} in Parse function
*/
var parsedData = manager.Parse({RawData}) 

/*
   generate {custom-object} to string and you can write it to Record
   file or anything you want to do with it
*/
var generatedData = manager.Generate({custom-object})
{RawData}
$TTL 86400

; SOA Record
@   IN	SOA	localhost.com.	root.localhost.	(
1	 ;serial
604800	 ;refresh
86400	 ;retry
2419200	 ;expire
86400	 ;minimum ttl
)  ;#soa*4dq8f1e3

; NS Records

; MX Records
@	IN	MX	69	127.0.0.1		;#mx*9budq8f1

; A Records

; AAAA Records

; CNAME Records

; TXT Records

; SRV Records
{custom-object}
{
     ttl: 86400,
     soa: {Options:{name: '@',
            id: "soa-id",
            minimum: 86400,
            expire: 2419200,
            retry: 86400,
            refresh: 604800,
            serial: 1,
            rname: 'root.localhost.',
            mname: "localhost.com." }},
     ns: [{Options:{
         name: '@',
         id: "ns-id",
         host: '127.0.0.1'
     }}]
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

bind-record-manager's People

Contributors

ahmadyazdanii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pazka

bind-record-manager's Issues

Pull request creation

Hi,

I wanted to bring changes to your library in the form of a pull request but the current rights doesn't allow me to push a new branch.

Is there a way that you could authorize that ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.