Documentation ¶
Index ¶
- Constants
- func GetRevision(project Project, manifest Manifest) (string, error)
- type AospaProject
- type Data
- type Defaults
- type MandyErr
- type MandyErrorCode
- type MandyNotification
- type MandyStatus
- func (mandyStatus *MandyStatus) Kill()
- func (mandyStatus *MandyStatus) Revert(user *User) error
- func (mandyStatus *MandyStatus) SetConflicted(name string, conflicted bool)
- func (mandyStatus *MandyStatus) StartMerging(user *User) error
- func (mandyStatus *MandyStatus) Strip() MandyStatus
- func (mandyStatus *MandyStatus) Submit(user *User) error
- type Manifest
- type ManifestErr
- type Notification
- type Project
- type Remote
- type RemoveProject
- type User
- type UserData
- func (userdata *UserData) FindUserByApi(api string) *User
- func (userdata *UserData) GetUserWithPassword(user *User) (User, MandyErrorCode)
- func (userdata *UserData) GetUsers() []*User
- func (userdata *UserData) GetVerifiedUsers() []*User
- func (userdata *UserData) InsertUser(user *User) (User, MandyErrorCode)
- func (userdata *UserData) Moderator(requester *User, user string, moderator bool) (*User, error)
- func (userdata *UserData) Remove(requester *User, user string) error
- func (userdata *UserData) UpdateFirebaseKey(apiToken string, keys []string) error
- func (userdata *UserData) UpdateUser(user *User)
- func (userdata *UserData) Verify(requester *User, user string, verified bool) (*User, error)
- type UserDataErr
Constants ¶
View Source
const AOSPA_BRANCH = "quartz"
View Source
const AOSPA_MANIFEST_NAME = "manifest"
View Source
const AOSPA_MANIFEST_URL = GITHUB_HTTP + "/AOSPA/manifest.git"
View Source
const CAF_BRANCH = "caf"
View Source
const GERRIT_URL = "ssh://" + MANDY_USERNAME + "@gerrit.aospa.co:29418"
View Source
const GITHUB_HTTP = "git://github.com"
View Source
const MANDY_BRANCH = AOSPA_BRANCH + "-bot"
View Source
const MANDY_EMAIL = "mergebot@aospa.co"
View Source
const MANDY_NAME = "Mergebot"
View Source
const MANDY_TAG = "Mandy"
View Source
const MANDY_USERNAME = "PAMergebot"
View Source
const MANIFEST_AOSPA = "manifests/aospa.xml"
View Source
const MANIFEST_DEFAULT = "default.xml"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AospaProject ¶
type MandyErrorCode ¶
type MandyErrorCode int
const CODE_API_INVALID MandyErrorCode = 2
const CODE_GET_NOTIFICATION_ACTIVITIES_FAILED MandyErrorCode = 15
const CODE_GET_USERS_FAILED MandyErrorCode = 12
const CODE_MERGE_FAILED MandyErrorCode = 8
const CODE_NO_ERROR MandyErrorCode = 0
const CODE_PASSWORD_SHORT MandyErrorCode = 4
const CODE_REMOVE_USER_FAILED MandyErrorCode = 14
const CODE_REVERT_FAILED MandyErrorCode = 10
const CODE_SET_CONFLICTION_FAILED MandyErrorCode = 9
const CODE_SET_MODERATION_FAILED MandyErrorCode = 13
const CODE_SET_VERIFICATION_FAILED MandyErrorCode = 13
const CODE_SUBMIT_FAILED MandyErrorCode = 11
const CODE_UNKNOWN_ERROR MandyErrorCode = 1
const CODE_USERNAME_PASSWORD_INVALID MandyErrorCode = 7
const CODE_USERNAME_SHORT MandyErrorCode = 5
const CODE_USERNAME_TAKEN MandyErrorCode = 3
type MandyNotification ¶
type MandyNotification int
const NOTIFICATION_MERGEABLE MandyNotification = 2
const NOTIFICATION_MERGED MandyNotification = 4
const NOTIFICATION_MERGING MandyNotification = 3
const NOTIFICATION_NEW_TAG_FOUND MandyNotification = 1
const NOTIFICATION_REVERTED MandyNotification = 6
const NOTIFICATION_REVERTING MandyNotification = 5
const NOTIFICATION_SUBMITTED MandyNotification = 8
const NOTIFICATION_SUBMITTING MandyNotification = 7
const NOTIFICATION_VERIFIED MandyNotification = 0
type MandyStatus ¶
type MandyStatus struct { ManifestTag string `json:"manifesttag"` LatestTag string `json:"latesttag"` AospaProjects []*AospaProject `json:"projects"` Mergeable bool `json:"mergeable"` Merging bool `json:"merging"` Merged bool `json:"merged"` Merger User `json:"merger"` Submittable bool `json:"submittable"` Submitting bool `json:"submitting"` Submitted bool `json:"submitted"` Submitter User `json:"submitter"` Reverting bool `json:"reverting"` Reverter User `json:"reverter"` Notification *Notification `json:"-"` // contains filtered or unexported fields }
func MandyInit ¶
func MandyInit(initialize bool, firebaseApiKey string, userdata *UserData) *MandyStatus
func (*MandyStatus) Kill ¶
func (mandyStatus *MandyStatus) Kill()
func (*MandyStatus) Revert ¶
func (mandyStatus *MandyStatus) Revert(user *User) error
func (*MandyStatus) SetConflicted ¶
func (mandyStatus *MandyStatus) SetConflicted(name string, conflicted bool)
func (*MandyStatus) StartMerging ¶
func (mandyStatus *MandyStatus) StartMerging(user *User) error
func (*MandyStatus) Strip ¶
func (mandyStatus *MandyStatus) Strip() MandyStatus
func (*MandyStatus) Submit ¶
func (mandyStatus *MandyStatus) Submit(user *User) error
type Manifest ¶
type Manifest struct { XMLName xml.Name `xml:"manifest"` Remotes []Remote `xml:"remote"` Defaults Defaults `xml:"default"` Projects []Project `xml:"project"` RemoveProjects []RemoveProject `xml:"remove-project"` }
func NewManifest ¶
type ManifestErr ¶
type ManifestErr string
func (ManifestErr) Error ¶
func (e ManifestErr) Error() string
type Notification ¶
type Notification struct { Activities []Data // contains filtered or unexported fields }
func NewNotification ¶
func NewNotification(firebaseApiKey string, userdata *UserData) *Notification
func (*Notification) Notify ¶
func (notification *Notification) Notify(notificationCode MandyNotification, data interface{}, users ...*User)
type Remote ¶
type RemoveProject ¶
type RemoveProject struct {
Name string `xml:"name,attr"`
}
type User ¶
type User struct { ApiToken string `json:"apitoken,omitempty"` Name string `json:"name"` Password string `json:"password,omitempty"` Salt string `json:"salt,omitempty"` Hash string `json:"hash,omitempty"` Admin bool `json:"admin"` Moderator bool `json:"moderator"` Verified bool `json:"verified"` FirebaseKey []string `json:"firebasekey,omitempty"` }
type UserData ¶
type UserData struct {
// contains filtered or unexported fields
}
func NewUserData ¶
func NewUserData() *UserData
func (*UserData) FindUserByApi ¶
func (*UserData) GetUserWithPassword ¶
func (userdata *UserData) GetUserWithPassword(user *User) (User, MandyErrorCode)
func (*UserData) GetVerifiedUsers ¶
func (*UserData) InsertUser ¶
func (userdata *UserData) InsertUser(user *User) (User, MandyErrorCode)
func (*UserData) UpdateFirebaseKey ¶
func (*UserData) UpdateUser ¶
type UserDataErr ¶
type UserDataErr string
func (UserDataErr) Error ¶
func (e UserDataErr) Error() string
Click to show internal directories.
Click to hide internal directories.