Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCommandType ¶
func RegisterCommandType(name string, commandType CommandType)
RegisterCommandType registers the specified command type under the name provided.
Types ¶
type Command ¶
type Command struct { XMLName xml.Name `xml:"command"` Type string `xml:"type,attr,omitempty"` Command string `xml:",chardata"` }
Command represents a command that is executed when a change is detected.
func (Command) Execute ¶
func (command Command) Execute(repository Repository, revision svn.Revision) error
Execute the command on the specified repository and revision.
func (*Command) UnmarshalXML ¶
UnmarshalXML unmarshals the command from XML whilst providing some extra validation.
type CommandType ¶
A CommandType is a method of passing data about a revision into a command.
type Repositories ¶
type Repositories struct { XMLName xml.Name `xml:"repositories"` Repositories []Repository `xml:"repository"` }
Repositories represents a collection of Repository objects.
func (*Repositories) ForURL ¶
func (r *Repositories) ForURL(url string) *Repository
ForURL returns the repository for the specified URL or creates one if it did not already exist.
type Repository ¶
type Repository struct { XMLName xml.Name `xml:"repository"` URL string `xml:"url,attr"` Revision int `xml:",chardata"` Updated bool `xml:"updated,attr"` }
Repository represents the last known state of a repository.
func (*Repository) UnmarshalXML ¶
func (r *Repository) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
UnmarshalXML unmarshals the repository from XML whilst providing some extra validation.
type Watch ¶
type Watch struct { XMLName xml.Name `xml:"watch"` URL string `xml:"url,attr"` Commands []Command `xml:"command"` }
Watch represents a watch on a specific repository.
func (*Watch) UnmarshalXML ¶
UnmarshalXML unmarshals the watch from XML whilst providing some extra validation.
func (Watch) Update ¶
func (w Watch) Update(repositories *Repositories) error
Update the watch using the provided collection of repositories. This will also run any commands if changes are found.