- web interface for hourly account charges!
[freeside.git] / httemplate / 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 </UL>
22 <!-- INDEX END -->
23
24 <HR>
25 <P>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::domain_record - Object methods for domain_record records</P>
28 <P>
29 <HR>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
31 <PRE>
32   use FS::domain_record;</PRE>
33 <PRE>
34   $record = new FS::domain_record \%hash;
35   $record = new FS::domain_record { 'column' =&gt; 'value' };</PRE>
36 <PRE>
37   $error = $record-&gt;insert;</PRE>
38 <PRE>
39   $error = $new_record-&gt;replace($old_record);</PRE>
40 <PRE>
41   $error = $record-&gt;delete;</PRE>
42 <PRE>
43   $error = $record-&gt;check;</PRE>
44 <P>
45 <HR>
46 <H1><A NAME="description">DESCRIPTION</A></H1>
47 <P>An FS::domain_record object represents an entry in a DNS zone.
48 FS::domain_record inherits from FS::Record.  The following fields are currently
49 supported:</P>
50 <DL>
51 <DT><STRONG><A NAME="item_recnum_%2D_primary_key">recnum - primary key</A></STRONG><BR>
52 <DD>
53 <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>
54 <DD>
55 <DT><STRONG><A NAME="item_partial">reczone - partial (or full) zone for this entry</A></STRONG><BR>
56 <DD>
57 <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>
58 <DD>
59 <DT><STRONG><A NAME="item_entry">rectype - record type for this entry (A, MX, etc.)</A></STRONG><BR>
60 <DD>
61 <DT><STRONG><A NAME="item_recdata_%2D_data_for_this_entry">recdata - data for this entry</A></STRONG><BR>
62 <DD>
63 </DL>
64 <P>
65 <HR>
66 <H1><A NAME="methods">METHODS</A></H1>
67 <DL>
68 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
69 <DD>
70 Creates a new entry.  To add the example to the database, see <A HREF="#insert">insert</A>.
71 <P>Note that this stores the hash reference, not a distinct copy of the hash it
72 points to.  You can ask the object for a copy with the <EM>hash</EM> method.</P>
73 <P></P>
74 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
75 <DD>
76 Adds this record to the database.  If there is an error, returns the error,
77 otherwise returns false.
78 <P></P>
79 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
80 <DD>
81 Delete this record from the database.
82 <P></P>
83 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
84 <DD>
85 Replaces the OLD_RECORD with this one in the database.  If there is an error,
86 returns the error, otherwise returns false.
87 <P></P>
88 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
89 <DD>
90 Checks all fields to make sure this is a valid example.  If there is
91 an error, returns the error, otherwise returns false.  Called by the insert
92 and replace methods.
93 <P></P></DL>
94 <P>
95 <HR>
96 <H1><A NAME="version">VERSION</A></H1>
97 <P>$Id: domain_record.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
98 <P>
99 <HR>
100 <H1><A NAME="bugs">BUGS</A></H1>
101 <P>The data validation doesn't check everything it could.  In particular,
102 there is no protection against bad data that passes the regex, duplicate
103 SOA records, forgetting the trailing `.', impossible IP addersses, etc.  Of
104 course, it's still better than editing the zone files directly.  :)</P>
105 <P>
106 <HR>
107 <H1><A NAME="see also">SEE ALSO</A></H1>
108 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
109
110 </BODY>
111
112 </HTML>