78601b4d022c86e7491c01f35b7b865bd82b71eb
[freeside.git] / htdocs / docs / man / FS / domain_record.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::domain_record - Object methods for domain_record records</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
14         <LI><A HREF="#name">NAME</A></LI>
15         <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16         <LI><A HREF="#description">DESCRIPTION</A></LI>
17         <LI><A HREF="#methods">METHODS</A></LI>
18         <LI><A HREF="#version">VERSION</A></LI>
19         <LI><A HREF="#bugs">BUGS</A></LI>
20         <LI><A HREF="#see also">SEE ALSO</A></LI>
21         <LI><A HREF="#history">HISTORY</A></LI>
22 </UL>
23 <!-- INDEX END -->
24
25 <HR>
26 <P>
27 <H1><A NAME="name">NAME</A></H1>
28 <P>FS::domain_record - Object methods for domain_record records</P>
29 <P>
30 <HR>
31 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 <PRE>
33   use FS::domain_record;</PRE>
34 <PRE>
35   $record = new FS::domain_record \%hash;
36   $record = new FS::domain_record { 'column' =&gt; 'value' };</PRE>
37 <PRE>
38   $error = $record-&gt;insert;</PRE>
39 <PRE>
40   $error = $new_record-&gt;replace($old_record);</PRE>
41 <PRE>
42   $error = $record-&gt;delete;</PRE>
43 <PRE>
44   $error = $record-&gt;check;</PRE>
45 <P>
46 <HR>
47 <H1><A NAME="description">DESCRIPTION</A></H1>
48 <P>An FS::domain_record object represents an entry in a DNS zone.
49 FS::domain_record inherits from FS::Record.  The following fields are currently
50 supported:</P>
51 <DL>
52 <DT><STRONG><A NAME="item_recnum_%2D_primary_key">recnum - primary key</A></STRONG><BR>
53 <DD>
54 <DT><STRONG><A NAME="item_Domain">svcnum - Domain (see <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>) of this entry</A></STRONG><BR>
55 <DD>
56 <DT><STRONG><A NAME="item_partial">reczone - partial (or full) zone for this entry</A></STRONG><BR>
57 <DD>
58 <DT><STRONG><A NAME="item_recaf_%2D_address_family_for_this_entry%2C_current">recaf - address family for this entry, currently only `IN' is recognized.</A></STRONG><BR>
59 <DD>
60 <DT><STRONG><A NAME="item_entry">rectype - record type for this entry (A, MX, etc.)</A></STRONG><BR>
61 <DD>
62 <DT><STRONG><A NAME="item_recdata_%2D_data_for_this_entry">recdata - data for this entry</A></STRONG><BR>
63 <DD>
64 </DL>
65 <P>
66 <HR>
67 <H1><A NAME="methods">METHODS</A></H1>
68 <DL>
69 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
70 <DD>
71 Creates a new entry.  To add the example to the database, see <A HREF="#insert">insert</A>.
72 <P>Note that this stores the hash reference, not a distinct copy of the hash it
73 points to.  You can ask the object for a copy with the <EM>hash</EM> method.</P>
74 <P></P>
75 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
76 <DD>
77 Adds this record to the database.  If there is an error, returns the error,
78 otherwise returns false.
79 <P></P>
80 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
81 <DD>
82 Delete this record from the database.
83 <P></P>
84 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
85 <DD>
86 Replaces the OLD_RECORD with this one in the database.  If there is an error,
87 returns the error, otherwise returns false.
88 <P></P>
89 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
90 <DD>
91 Checks all fields to make sure this is a valid example.  If there is
92 an error, returns the error, otherwise returns false.  Called by the insert
93 and replace methods.
94 <P></P></DL>
95 <P>
96 <HR>
97 <H1><A NAME="version">VERSION</A></H1>
98 <P>$Id: domain_record.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
99 <P>
100 <HR>
101 <H1><A NAME="bugs">BUGS</A></H1>
102 <P>The data validation doesn't check everything it could.  In particular,
103 there is no protection against bad data that passes the regex, duplicate
104 SOA records, forgetting the trailing `.', impossible IP addersses, etc.  Of
105 course, it's still better than editing the zone files directly.  :)</P>
106 <P>
107 <HR>
108 <H1><A NAME="see also">SEE ALSO</A></H1>
109 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
110 <P>
111 <HR>
112 <H1><A NAME="history">HISTORY</A></H1>
113 <P>$Log: domain_record.html,v $
114 <P>Revision 1.1  2001-04-23 12:41:57  ivan
115 <P>new API documentation
116 <P>
117 Revision 1.1  2000/02/03 05:16:52  ivan
118 beginning of DNS and Apache support</P>
119
120 </BODY>
121
122 </HTML>