Documentation ¶
Index ¶
- Constants
- func GetKubeConfig(token string) (string, error)
- func GetNamespaceByAnnotation(annotations []string) (string, string, error)
- func GetUserByUsername(username string) (string, []string, error)
- func Login(username string, password string) (string, string, string, error)
- func Register(username, email string) error
- func ResetPassword(userId, email, newPassword string) error
- type Admin
- type CheckPaymeePaymentResponse
- type Company
- type CreateNsRespData
- type Data
- type FindUserData
- type Kubeconfig
- type Limit
- type MetadDataData
- type NsData
- type Project
- type ProjectRoliBindingsData
- type ReqData
- type ReqDataAddProjectToBillingAccount
- type ReqDataCreateBillingAccount
- type ReqDataKubeconfig
- type ReqDataLogin
- type ReqDataNewUser
- type ReqDataRegister
- type ReqDataResetPassword
- type RespData
- type RespDataCreateBillingAccount
- type RespDataCreateGitRepo
- type RespDataCreateUser
- type RespDataLogin
- type RespDataNs
- type RespDataProjectsByUser
- type RespDataProvisionProject
- type RespDataProvisionProjectNewUser
- type RespDataRoleBinding
- type RespDataUser
- type RespDataUserByUserId
- type TokenResponse
- type UserData
Constants ¶
View Source
const ( STARTER = "Starter" PRO = "Pro" ELITE = "Elite" PAYPERUSE = "PayPerUse" )
Variables ¶
This section is empty.
Functions ¶
func GetKubeConfig ¶
func ResetPassword ¶
Types ¶
type CheckPaymeePaymentResponse ¶
type CheckPaymeePaymentResponse struct { Status bool `json:"status"` Message string `json:"message"` Code int64 `json:"code"` Data struct { PaymentStatus bool `json:"payment_status"` Token string `json:"token"` Amount float64 `json:"amount"` TransactionId int64 `json:"transaction_id"` BuyerId int64 `json:"buyer_id"` } }
type CreateNsRespData ¶
type FindUserData ¶
type FindUserData struct {
Data []Data `json:"data"`
}
type Kubeconfig ¶
type MetadDataData ¶
type NsData ¶
type NsData struct { Id string `json:"id"` Metadata MetadDataData `json:"metadata"` }
type ProjectRoliBindingsData ¶
type ProjectRoliBindingsData struct {
Id string `json:"id"`
}
type ReqData ¶
type ReqData struct { // TODO: add billing account data and validte it UsrProjectName string `json:"projectName"` BillingAccountId string `json:"billingAccountId"` PaymentToken string `json:"paymentToken"` UserId string `json:"userId"` UUID string `json:"uuid"` Plan string `json:"plan"` GitRepoName string `json:"gitRepoName"` GitRepoBranch string `json:"gitRepoBranch"` GitRepoUrl string `json:"gitRepoUrl"` IsCompany bool `json:"isCompany"` CompanyName string `json:"companyName"` TaxId string `json:"taxId"` Phone string `json:"phone"` Email string `json:"email"` Balance float64 `json:"balance"` }
type ReqDataKubeconfig ¶
type ReqDataKubeconfig struct {
Token string `json:"token"`
}
type ReqDataLogin ¶
func (*ReqDataLogin) Validate ¶
func (r *ReqDataLogin) Validate() error
type ReqDataNewUser ¶
type ReqDataNewUser struct { UsrProjectName string `json:"projectName"` Username string `json:"username"` Plan string `json:"plan"` GitRepoName string `json:"gitRepoName"` GitRepoBranch string `json:"gitRepoBranch"` GitRepoUrl string `json:"gitRepoUrl"` }
func (*ReqDataNewUser) Validate ¶
func (r *ReqDataNewUser) Validate() error
type ReqDataRegister ¶
type ReqDataResetPassword ¶
type ReqDataResetPassword struct { UserId string `json:"userId"` Email string `json:"email"` NewPassword string `json:"newPassword"` }
func (*ReqDataResetPassword) Validate ¶
func (r *ReqDataResetPassword) Validate() error
type RespDataCreateBillingAccount ¶
type RespDataCreateBillingAccount struct {
Id string `json:"uuid"`
}
type RespDataCreateGitRepo ¶
type RespDataCreateGitRepo struct {
Id string `json:"id"`
}
type RespDataCreateUser ¶
type RespDataLogin ¶
type RespDataNs ¶
type RespDataNs struct {
Data []NsData `json:"data"`
}
type RespDataProjectsByUser ¶
type RespDataProjectsByUser struct {
Data []ProjectRoliBindingsData `json:"data"`
}
type RespDataProvisionProject ¶
type RespDataProvisionProject struct {
ProjectId string `json:"projectId"`
}
func ProvisionProject ¶
func ProvisionProject(req ReqData) (data RespDataProvisionProject, err error)
type RespDataRoleBinding ¶
type RespDataRoleBinding struct { RoleTemplateId string `json:"roleTemplateId"` Name string `json:"name"` Type string `json:"type"` Code string `json:"code"` }
func AddUserToProject ¶
func AddUserToProject(userId string, projectId string) (RespDataRoleBinding, error)
type RespDataUser ¶
type RespDataUserByUserId ¶
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
type UserData ¶
type UserData struct {
Data []RespDataUser `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.