Documentation ¶
Index ¶
- Variables
- func Contains(s []string, str string) bool
- func CreateClusterDeployment(labRequest *LabRequest)
- func Decode(src string) ([]byte, error)
- func DecodeAlphabet(src string, alphabet *Alphabet) ([]byte, error)
- func DefaultClientK8sAuthenticate() (*rest.Config, error)
- func DynamicClientK8sAuthenticate() (Interface, error)
- func Encode(src []byte) string
- func EncodeAlphabet(src []byte, alphabet *Alphabet) string
- func GenerateMultiplePastes(bin string, contents map[string]string) map[string]string
- func GenerateSSHKeys() (publickey []byte, privatekey []byte)
- func GenerateSinglePaste(bin string, contents map[string]string) map[string]string
- func GetClusterDeployments() map[string]interface{}
- func GithubAuthenticate() (*github.Client, context.Context)
- func GoogleDriveAuthenticate(credentials string, token string) (client *http.Client, err error)
- func HiveClientK8sAuthenticate() runtimec.Client
- func K8sAuthenticate() *kubernetes.Clientset
- func SendAdminEmail(to *[]string, cc *[]string, bcc *[]string, clusterinfo map[string]string)
- func SendConfigEmail(to *[]string, cc *[]string, bcc *[]string, clusterinfo map[string]string)
- func SendCredsEmail(to *[]string, cc *[]string, bcc *[]string, clusterinfo map[string]string)
- func SendWelcomeEmail(to *[]string, cc *[]string, bcc *[]string, clusterinfo map[string]string)
- type Alphabet
- type Cfg
- type CreatePasteRequest
- type CreatePasteRequestMeta
- type CreatePasteResponse
- type FormRequest
- type InstallConfig
- type LabRequest
- type LabRequestBranch
- type LabRequestFile
- type PBClient
- type PasteContent
- type PasteData
- type PasteSpec
- type RequestForm
- type UtcTime
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// BitcoinAlphabet is the bitcoin alphabet.
BitcoinAlphabet, _ = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")
)
vars and funcs for pastes
Functions ¶
func CreateClusterDeployment ¶
func CreateClusterDeployment(labRequest *LabRequest)
func DynamicClientK8sAuthenticate ¶
func DynamicClientK8sAuthenticate() (Interface, error)
func EncodeAlphabet ¶
func GenerateMultiplePastes ¶
func GenerateSSHKeys ¶
GenerateSSHKeys creates SSH Keys for LabRequest
func GenerateSinglePaste ¶
func GetClusterDeployments ¶
func GetClusterDeployments() map[string]interface{}
func GoogleDriveAuthenticate ¶
func K8sAuthenticate ¶
func K8sAuthenticate() *kubernetes.Clientset
func SendAdminEmail ¶
func SendConfigEmail ¶
func SendCredsEmail ¶
Types ¶
type Alphabet ¶
func NewAlphabet ¶
type Cfg ¶
type Cfg struct { Name string `json:"name"` Host string `json:"host"` Username string `json:"username"` Password string `json:"password"` Expire string `json:"expire"` OpenDiscussion bool `json:"open_discussion"` BurnAfterReading bool `json:"burn_after_reading"` Formatter string `json:"formatter"` }
type CreatePasteRequest ¶
type CreatePasteRequest struct { V int `json:"v"` AData []interface{} `json:"adata"` Meta CreatePasteRequestMeta `json:"meta"` CT string `json:"ct"` }
type CreatePasteRequestMeta ¶
type CreatePasteRequestMeta struct {
Expire string `json:"expire"`
}
type CreatePasteResponse ¶
type FormRequest ¶
type InstallConfig ¶
type LabRequest ¶
type LabRequest struct { Timestamp string `json:"time"` Epoch int `json:"epoch" validate:"required"` ID uuid.UUID `json:"labid" validate:"omitempty"` LeaseTime int `json:"leaseTime" validate:"omitempty"` PrimaryContactName string `json:"primaryContactName" validate:"required"` PrimaryContactEmail string `json:"primaryContactEmail" validate:"required,email"` PrimaryContactPhoneNumber string `json:"primaryContactPhoneNumber" validate:"omitempty"` PrimaryContactConnectUser bool `json:"isPrimaryContactConnectUser" validate:"omitempty"` SecondaryContactName string `json:"secondaryContactName" validate:"required"` SecondaryContactEmail string `json:"secondaryContactEmail" validate:"required,email"` SecondaryContactPhoneNumber string `json:"secondaryContactPhoneNumber" validate:"omitempty"` SecondaryContactConnectUser bool `json:"isSecondaryContactConnectUser" validate:"omitempty"` RedHatSponsor string `json:"redHatSponsor" validate:"required"` Availability string `json:"availability" validate:"required"` CompanyName string `json:"companyName" validate:"required"` CompanyConnectPartner bool `json:"isCompanyConnectPartner" validate:"omitempty"` CertificationProject string `json:"certificationProject" validate:"omitempty"` IntendedCertificationProject string `json:"intendedCertificationProject" validate:"omitempty"` ProjectName string `json:"projectName" validate:"omitempty"` PublicSSHKey string `json:"publicsshkey" validate:"omitempty"` ClusterName string `json:"clusterName" validate:"required"` ClusterSize int `json:"clusterSize" validate:"omitempty"` OpenShiftVersion string `json:"openShiftVersion" validate:"required"` Description string `json:"description" validate:"omitempty"` Notes string `json:"notes" validate:"omitempty"` }
type LabRequestBranch ¶
LabRequestBranch is the branch created when a LabRequest has been validated and approved. This branch is used when creating a PR for the LabRequest and is based on latest master
type LabRequestFile ¶
type LabRequestFile struct { FileName string `json:"filename"` FileCommitMessage string `json:"filecommitmessage"` FileContent string `json:"filecontent"` }
LabRequestFile is the file generated for a pull request when a LabRequest has been validated and approved. This file is created prior to creating the pull request.
type PBClient ¶
func (*PBClient) CreatePaste ¶
func (c *PBClient) CreatePaste(message, expire, formatter string, openDiscussion, burnAfterReading bool) (*CreatePasteResponse, error)
type PasteContent ¶
type PasteContent struct {
Paste string `json:"paste"`
}
type PasteSpec ¶
type RequestForm ¶
type RequestForm struct { ID uuid.UUID `json:"id" db:"id"` Time string `json:"time" db:"time"` Epoch string `json:"epoch" db:"epoch"` Clusterid string `json:"clusterid" db:"clusterid"` Generatedclustername string `json:"generatedclustername" db:"generatedclustername"` Provider string `json:"provider" db:"provider"` Openshiftversion string `json:"openshiftversion" db:"openshiftversion"` Clustersize string `json:"clustersize" db:"clustersize"` Companyname string `json:"companyname" db:"companyname"` Connectpartner string `json:"connectpartner" db:"connectpartner"` Sponsor string `json:"sponsor" db:"sponsor"` Primaryname string `json:"primaryname" db:"primaryname"` Primaryemail string `json:"primaryemail" db:"primaryemail"` Primaryphone string `json:"primaryphone" db:"primaryphone"` Primaryconnect string `json:"primaryconnect" db:"primaryconnect"` Secondaryname string `json:"secondaryname" db:"secondaryname"` Secondaryemail string `json:"secondaryemail" db:"secondaryemail"` Secondaryphone string `json:"secondaryphone" db:"secondaryphone"` Secondaryconnect string `json:"secondaryconnect" db:"secondaryconnect"` Timezone string `json:"timezone" db:"timezone"` Projectname string `json:"projectname" db:"projectname"` Clustername string `json:"clustername" db:"clustername"` Reservation string `json:"reservation" db:"reservation"` Certproject string `json:"certproject" db:"certproject"` Intendedcertproject string `json:"intendedcertproject" db:"intendedcertproject"` Description string `json:"description" db:"description"` Notes string `json:"notes" db:"notes"` Startdate string `json:"startdate" db:"startdate"` Enddate string `json:"enddate" db:"enddate"` State string `json:"state" db:"state"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
RequestForm is used by pop to map your request_forms database table to your go code.
Click to show internal directories.
Click to hide internal directories.