package
0.6.0
Repository: https://github.com/devshell/gophish.git
Documentation: pkg.go.dev

# Functions

CompleteCampaign effectively "ends" a campaign.
DeleteCampaign deletes the specified campaign.
DeleteGroup deletes a given group by group ID and user ID.
DeletePage deletes an existing page in the database.
DeleteSMTP deletes an existing SMTP in the database.
DeleteTemplate deletes an existing template in the database.
GenerateMailLog creates a new maillog for the given campaign and result.
GetCampaign returns the campaign, if it exists, specified by the given id and user_id.
GetCampaignResults returns just the campaign results for the given campaign.
GetCampaigns returns the campaigns owned by the given user.
GetCampaignSummaries gets the summary objects for all the campaigns owned by the current user.
GetCampaignSummary gets the summary object for a campaign specified by the campaign ID.
GetGroup returns the group, if it exists, specified by the given id and user_id.
GetGroupByName returns the group, if it exists, specified by the given name and user_id.
GetGroups returns the groups owned by the given user.
GetGroupSummaries returns the summaries for the groups created by the given uid.
GetGroupSummary returns the summary for the requested group.
GetMailLogsByCampaign returns all of the mail logs for a given campaign.
GetPage returns the page, if it exists, specified by the given id and user_id.
GetPageByName returns the page, if it exists, specified by the given name and user_id.
GetPages returns the pages owned by the given user.
GetQueuedCampaigns returns the campaigns that are queued up for this given minute.
GetQueuedMailLogs returns the mail logs that are queued up for the given minute.
GetResult returns the Result object from the database given the ResultId.
GetSMTP returns the SMTP, if it exists, specified by the given id and user_id.
GetSMTPByName returns the SMTP, if it exists, specified by the given name and user_id.
GetSMTPs returns the SMTPs owned by the given user.
GetTargets performs a many-to-many select to get all the Targets for a Group.
GetTemplate returns the template, if it exists, specified by the given id and user_id.
GetTemplateByName returns the template, if it exists, specified by the given name and user_id.
GetTemplates returns the templates owned by the given user.
GetUser returns the user that the given id corresponds to.
GetUserByAPIKey returns the user that the given API Key corresponds to.
GetUserByUsername returns the user that the given username corresponds to.
LockMailLogs locks or unlocks a slice of maillogs for processing.
PostCampaign inserts a campaign and all associated records into the database.
PostGroup creates a new group in the database.
PostPage
PostPage creates a new page in the database.
PostSMTP creates a new SMTP in the database.
PostTemplate creates a new template in the database.
PutGroup updates the given group if found in the database.
PutPage edits an existing Page in the database.
PutSMTP edits an existing SMTP in the database.
PutTemplate edits an existing template in the database.
PutUser updates the given user.
Setup initializes the Conn object It also populates the Gophish Config object.
UnlockAllMailLogs removes the processing lock for all maillogs in the database.
UpdateTarget updates the given target information in the database.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RecipientParameter is the URL parameter that points to the result ID for a recipient.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrCampaignNameNotSpecified indicates there was no template given by the user.
ErrNoEmailSpecified is thrown when no email is specified for the Target.
ErrFromAddressNotSpecified is thrown when there is no "From" address specified in the SMTP configuration.
ErrGroupNameNotSpecified is thrown when a group name is not specified.
ErrGroupNotFound indicates a group specified by the user does not exist in the database.
ErrGroupNotSpecified indicates there was no template given by the user.
ErrHostNotSpecified is thrown when there is no Host specified in the SMTP configuration.
ErrInvalidHost indicates that the SMTP server string is invalid.
ErrMaxSendAttempts is thrown when the maximum number of sending attemps for a given MailLog is exceeded.
ErrNoTargetsSpecified is thrown when no targets are specified by the user.
ErrPageNameNotSpecified is thrown if the name of the landing page is blank.
ErrPageNotFound indicates a page specified by the user does not exist in the database.
ErrPageNotSpecified indicates a landing page was not provided for the campaign.
ErrSMTPNotFound indicates a sending profile specified by the user does not exist in the database.
ErrSMTPNotSpecified indicates a sending profile was not provided for the campaign.
ErrTemplateMissingParameter is thrown when a needed parameter is not provided.
ErrTemplateNameNotSpecified is thrown when a template name is not specified.
ErrTemplateNotFound indicates the template specified does not exist in the database.
ErrTemplateNotSpecified indicates there was no template given by the user.
MaxSendAttempts set to 8 since we exponentially backoff after each failed send attempt.

# Structs

Attachment contains the fields and methods for an email attachment.
Campaign is a struct representing a created campaign.
CampaignResults is a struct representing the results from a campaign.
CampaignStats is a struct representing the statistics for a single campaign.
CampaignSummaries is a struct representing the overview of campaigns.
CampaignSummary is a struct representing the overview of a single camaign.
Dialer is a wrapper around a standard gomail.Dialer in order to implement the mailer.Dialer interface.
Event contains the fields for an event that occurs during the campaign.
Flash is used to hold flash information for use in templates.
Group contains the fields needed for a user -> group mapping Groups contain 1..* Targets.
GroupSummaries is a struct representing the overview of Groups.
GroupSummary represents a summary of the Group model.
GroupTarget is used for a many-to-many relationship between 1..* Groups and 1..* Targets.
Header contains the fields and methods for a sending profile to have custom headers.
MailLog is a struct that holds information about an email that is to be sent out.
Page contains the fields used for a Page model.
Response contains the attributes found in an API response.
Result contains the fields for a result object, which is a representation of a target in a campaign.
SendTestEmailRequest is the structure of a request to send a test email to test an SMTP connection.
SMTP contains the attributes needed to handle the sending of campaign emails.
Target contains the fields needed for individual targets specified by the user Groups contain 1..* Targets, but 1 Target may belong to 1..* Groups.
Template models hold the attributes for an email template to be sent to targets.
User represents the user model for gophish.