Versions in this module Expand all Collapse all v1 v1.5.0 Jan 6, 2022 v1.4.0 Nov 16, 2021 v1.3.2 Oct 19, 2021 v1.3.1 Oct 14, 2021 v1.3.0 Oct 11, 2021 Changes in this version + func Set(ng *dbengine.DBEngine) v1.3.0-rc Sep 10, 2021 v1.2.2 Sep 7, 2021 v1.2.1 Aug 20, 2021 v1.2.0 Aug 13, 2021 v1.2.0-rc Aug 2, 2021 v1.1.1 Aug 3, 2021 v1.1.0 Jul 31, 2021 Changes in this version + const BULK_INSERT_CHUNK_SIZE + const DistinctAssetIDFromAccess + const ExtraAccessKey + const ExtraBucket + const ExtraEndpoint + const ExtraSecretKey + const HTTP + const PageNo + const PageSize + const SelectFoundRows + func CheckVersionConflict(orgID uint64, assetID string, major, minor, patch uint64) (result [][3]uint64, ok bool, err error) + func Close() error + func CreateApiTest(at *ApiTest) (int64, error) + func CreateOrUpdateAPIAssetVersionSpec(spec *APIAssetVersionSpecsModel) error + func CreateTestEnv(env *APITestEnv) (int64, error) + func DeleteAPIAssetByOrgAssetID(orgID uint64, assetID string, cascade bool) error + func DeleteAPIAssetVersion(orgID uint64, assetID string, versionID uint64, cascade bool) error + func DeleteApiTest(apiID int64) error + func DeleteTestEnv(envID int64) error + func FirstOrCreateInstantiation(model *apistructs.InstantiationModel, params map[string]interface{}) error + func GenSemVer(orgID uint64, assetID, swaggerVersion string, major, minor, patch *uint64) error + func GetAPIAssetVersion(req *apistructs.GetAPIAssetVersionReq) (*apistructs.APIAssetVersionsModel, error) + func GetContract(req *apistructs.GetContractReq) (*apistructs.ContractModel, error) + func GetMyClient(req *apistructs.GetClientReq, orgManager bool) (*apistructs.ClientModel, error) + func InsertTPRecords(rs ...*TPRecordDO) error + func ListAPIsByTestCaseIDs(projectID uint64, tcIDs []uint64) (map[uint64][]*ApiTest, error) + func ListAccess(req *apistructs.ListAccessReq, responsibleAssetIDs []string) (uint64, []*apistructs.ListAccessObj, error) + func ListContractRecords(req *apistructs.ListContractRecordsReq) ([]*apistructs.ContractRecordModel, error) + func ListContracts(req *apistructs.ListContractsReq) (uint64, []*apistructs.ContractModelAdvance, error) + func ListMyClients(req *apistructs.ListMyClientsReq, orgManager bool) (total uint64, models []*apistructs.ClientModel, err error) + func ListSwaggerVersionClients(req *apistructs.ListSwaggerVersionClientsReq) ([]*apistructs.ListSwaggerVersionClientOjb, error) + func OneInstantiation(model *apistructs.InstantiationModel, params map[string]interface{}) error + func Open() error + func PagingAPIAssetVersions(req *apistructs.PagingAPIAssetVersionsReq) (uint64, []*apistructs.APIAssetVersionsModel, error) + func QueryAPILatestVersion(orgID uint64, assetID string) (*apistructs.APIAssetVersionsModel, error) + func QuerySpecsFromVersions(orgID uint64, assetID string, versionIDs []string, ...) error + func QueryVersionLatestSpec(orgID, versionID uint64) (*apistructs.APIAssetVersionSpecsModel, error) + func Sq() *gorm.DB + func UpdateApiTest(at *ApiTest) (int64, error) + func UpdateApiTestResults(at *ApiTest) (int64, error) + func UpdateInstantiation(req *apistructs.UpdateInstantiationReq) error + func UpdateTestEnv(env *APITestEnv) error + type APIAssetVersionSpecsModel apistructs.APIAssetVersionSpecsModel + func GetAPIAssetVersionSpec(req *apistructs.GetAPIAssetVersionReq) (*APIAssetVersionSpecsModel, error) + func (m APIAssetVersionSpecsModel) TableName() string + type APIAssetsModel apistructs.APIAssetsModel + func GetAPIAsset(req *apistructs.GetAPIAssetReq) (*APIAssetsModel, error) + func (APIAssetsModel) TableName() string + type APITestEnv struct + CreatedAt time.Time + Domain string + EnvID int64 + EnvType string + Global string + Header string + ID int64 + Name string + UpdatedAt time.Time + func GetTestEnv(envID int64) (*APITestEnv, error) + func GetTestEnvListByEnvID(envID int64, envType string) ([]APITestEnv, error) + func (APITestEnv) TableName() string + type ApiTest struct + ApiInfo string + ApiRequest string + ApiResponse string + AssertResult string + CreatedAt time.Time + ID int64 + PipelineID int64 + ProjectID int64 + Status string + UpdatedAt time.Time + UsecaseID int64 + UsecaseOrder int64 + func GetApiTest(apiID int64) (*ApiTest, error) + func GetApiTestListByUsecaseID(usecaseID int64) ([]ApiTest, error) + func (ApiTest) TableName() string + type DBClient struct + var DB *DBClient + func (db *DBClient) BulkInsert(objects interface{}, excludeColumns ...string) error + func (db *DBClient) Sq() *gorm.DB + func (db *DBClient) Transaction(f func(tx *gorm.DB) error) error + func (db *DBClient) Tx() *TX + type KV map[string]interface + type Paging struct + List interface{} + PageNo int + PageSize int + Total int64 + func FindTPRecordPagingByAppID(req apistructs.TestRecordPagingRequest) (*Paging, error) + func NewPaging(pageNo, pageSize int) *Paging + type Pipeline struct + Envs map[string]string + ResourceTypes []ResourceType + Resources []Resource + Stages []*Stage + Triggers []Trigger + Version string + type QASonar struct + ApplicationID int64 + ApplicationName string + Branch string + Bugs string + BuildID int64 + CodeSmells string + CommitID string + Coverage string + CreatedAt time.Time + Duplications string + GitRepo string + ID int64 + IssuesStatistics string + Key string + LogID string + OperatorID string + ProjectID int64 + UpdatedAt time.Time + Vulnerabilities string + func FindLatestSonarByAppID(appID int64) (*QASonar, error) + func (QASonar) TableName() string + type Resource struct + Name string + Source KV + Type string + type ResourceType struct + Name string + Source KV + Type string + type Schedule struct + Cron string + type Stage struct + Name string + Tasks []Tasks + type TPRecordDO struct + Application string + ApplicationID int64 + ApplicationName string + Avatar string + Branch string + BuildID int64 + CaseDir string + CommitID string + CreatedAt time.Time + Desc string + Envs map[string]string + Extra map[string]string + GitRepo string + ID uint64 + Name string + OperatorID string + OperatorName string + Output string + ParserType types.TestParserType + ProjectID int64 + Suites []*apistructs.TestSuite + TType apistructs.TestType + Totals *apistructs.TestTotals + UUID string + UpdatedAt time.Time + Workspace apistructs.DiceWorkspace + func FindTPRecord(tp *TPRecordDO) (*TPRecordDO, error) + func FindTPRecordByCommitId(commitID string) (*TPRecordDO, error) + func FindTPRecordById(id uint64) (*TPRecordDO, error) + func InsertTPRecord(r *TPRecordDO) (*TPRecordDO, error) + func NewTPRecordDO() *TPRecordDO + func (TPRecordDO) TableName() string + func (tp *TPRecordDO) EraseSensitiveInfo() + func (tp *TPRecordDO) GenSubject() string + func (tp *TPRecordDO) GetExtraInfo(key string) string + func (tp *TPRecordDO) GetRecordName() string + func (tp *TPRecordDO) SetCols(cols interface{}) (*TPRecordDO, error) + func (tp *TPRecordDO) SetTPType(tpType apistructs.TestType) *TPRecordDO + type TX struct + func Tx() *TX + func (tx *TX) Sq() *gorm.DB + type Tasks KV + type Trigger struct + Schedule Schedule v1.1.0-rc Jul 8, 2021