Documentation ¶
Index ¶
Constants ¶
const ( // StandardDir is the directory that typically contains the conflict and // deleted manifest. StandardDir = "DfsrPrivate" // StandardFile is the name of the typical conflict and deleted manifest file. StandardFile = "ConflictAndDeletedManifest.xml" // StandardPath is the last part of a typical conflict and deleted manifest // file path. StandardPath = `\` + StandardDir + `\` + StandardFile )
const TimeFormat = "MST 2006:1:2-15:4:5"
TimeFormat describes the DFSR manifest time format.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cursor ¶
type Cursor struct {
// contains filtered or unexported fields
}
Cursor provides forward-only access to DFSR conflict and deleted manifests.
Cursors should be created with NewCursor. When finished with a cursor it should be closed.
func NewAdvancedCursor ¶
func NewAdvancedCursor(reader io.ReadCloser, resolver Resolver, filter Filter) *Cursor
NewAdvancedCursor returns a new cursor for the DFSR conflict and deleted manifest file at path.
If filter is non-nil, the cursor will return resources that are matched by the filter. If filter is nil, all resources will be returned.
If resolver is non-nil, the cursor will attempt to populate the partner host and distinguished name fields of each resource by querying the resolver.
When finished with the cursor, it is the caller's responsibiliy to close it.
func NewCursor ¶
func NewCursor(reader io.ReadCloser) *Cursor
NewCursor returns a new cursor for the DFSR conflict and deleted manifest file at path.
When finished with the cursor, it is the caller's responsibiliy to close it.
func (*Cursor) End ¶
End will cause the cursor to read from its current position until the end of the manifest file. This is typically used to tally statistics about the manifest without processing individual records. Statistics can be retrieved by calling Stats().
If End encounters an error before reaching the end of the file, that error will be returned. End returns nil when io.EOF has been reached.
End will not close the cursor.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder reads and decodes DFSR conflict and deleted manifest entries from an input stream.
func NewDecoder ¶
NewDecoder returns a DFSR conflicted and deleted manifest decoder that reads from r.
type Info ¶
type Info struct { Modified time.Time // The last time the manifest was updated Size int64 // The size of the manifest in bytes }
Info provides information about a DFSR conflict and deleted manifest.
type Manifest ¶
type Manifest struct {
// contains filtered or unexported fields
}
Manifest provides access to a DFSR conflict and deleted manifest file.
func BufferedFile ¶
BufferedFile returns a manifest for the conflict and deleted manifest file located at the given path. The contents of the file will be read immediately and buffered in memory.
func File ¶
File returns a manifest for the conflict and deleted manifest file located at the given path.
func (*Manifest) AdvancedCursor ¶
AdvancedCursor creates a new cursor for the manifest with the given resolver and filter.
type Resolver ¶
type Resolver func(guid string) (info dfsr.MemberInfo, ok bool)
Resolver is capable of resolving DFSR member GUIDs.
type Resource ¶
type Resource struct { PartnerGUID uuid.UUID `xml:"PartnerGuid"` PartnerHost string `xml:"PartnerHost,omitempty"` PartnerDN string `xml:"PartnerDN,omitempty"` Type string `xml:"Type"` Time time.Time `xml:"Time"` // contains filtered or unexported fields }
Resource is a DFSR manifest resource entry.
func (*Resource) UnmarshalXML ¶
UnmarshalXML decodes DFSR manifest time values.
type Source ¶
type Source interface { Reader() (io.ReadCloser, error) Info() (Info, error) }
Source is a source of conflict and deleted manifest data.
type Stats ¶
type Stats struct { Entries int // Number of entries Size int64 // Cumulative size of all entries First time.Time // Timestamp of first entry Last time.Time // Timestamp of last entry }
Stats hold cumulative statistics for DFSR manifests.
type Time ¶
Time is a time.Time that can be used by an XML decoder to deserialize manifest time values.
func (*Time) UnmarshalXML ¶
UnmarshalXML decodes DFSR manifest time values.