github.com/cobalt77/jfrog-client-go@v0.14.5/artifactory/emptymanager.go (about) 1 package artifactory 2 3 import ( 4 "io" 5 6 "github.com/cobalt77/jfrog-client-go/artifactory/buildinfo" 7 rthttpclient "github.com/cobalt77/jfrog-client-go/artifactory/httpclient" 8 "github.com/cobalt77/jfrog-client-go/artifactory/services" 9 _go "github.com/cobalt77/jfrog-client-go/artifactory/services/go" 10 "github.com/cobalt77/jfrog-client-go/artifactory/services/utils" 11 "github.com/cobalt77/jfrog-client-go/config" 12 "github.com/cobalt77/jfrog-client-go/utils/io/content" 13 ) 14 15 type ArtifactoryServicesManager interface { 16 CreateLocalRepository() *services.LocalRepositoryService 17 CreateRemoteRepository() *services.RemoteRepositoryService 18 CreateVirtualRepository() *services.VirtualRepositoryService 19 UpdateLocalRepository() *services.LocalRepositoryService 20 UpdateRemoteRepository() *services.RemoteRepositoryService 21 UpdateVirtualRepository() *services.VirtualRepositoryService 22 DeleteRepository(repoKey string) error 23 GetRepository(repoKey string) (*services.RepositoryDetails, error) 24 CreatePermissionTarget(params services.PermissionTargetParams) error 25 UpdatePermissionTarget(params services.PermissionTargetParams) error 26 DeletePermissionTarget(permissionTargetName string) error 27 PublishBuildInfo(build *buildinfo.BuildInfo) error 28 DistributeBuild(params services.BuildDistributionParams) error 29 PromoteBuild(params services.PromotionParams) error 30 DiscardBuilds(params services.DiscardBuildsParams) error 31 XrayScanBuild(params services.XrayScanParams) ([]byte, error) 32 GetPathsToDelete(params services.DeleteParams) (*content.ContentReader, error) 33 DeleteFiles(reader *content.ContentReader) (int, error) 34 ReadRemoteFile(readPath string) (io.ReadCloser, error) 35 initDownloadService() *services.DownloadService 36 DownloadFiles(params ...services.DownloadParams) (totalDownloaded, totalExpected int, err error) 37 DownloadFilesWithResultReader(params ...services.DownloadParams) (resultReader *content.ContentReader, totalDownloaded, totalExpected int, err error) 38 GetUnreferencedGitLfsFiles(params services.GitLfsCleanParams) (*content.ContentReader, error) 39 SearchFiles(params services.SearchParams) (*content.ContentReader, error) 40 Aql(aql string) (io.ReadCloser, error) 41 SetProps(params services.PropsParams) (int, error) 42 DeleteProps(params services.PropsParams) (int, error) 43 UploadFiles(params ...services.UploadParams) (artifactsFileInfo []utils.FileInfo, totalUploaded, totalFailed int, err error) 44 Copy(params services.MoveCopyParams) (successCount, failedCount int, err error) 45 Move(params services.MoveCopyParams) (successCount, failedCount int, err error) 46 PublishGoProject(params _go.GoParams) error 47 Ping() ([]byte, error) 48 GetConfig() config.Config 49 GetBuildInfo(params services.BuildInfoParams) (*buildinfo.BuildInfo, error) 50 CreateToken(params services.CreateTokenParams) (services.CreateTokenResponseData, error) 51 GetTokens() (services.GetTokensResponseData, error) 52 RefreshToken(params services.RefreshTokenParams) (services.CreateTokenResponseData, error) 53 RevokeToken(params services.RevokeTokenParams) (string, error) 54 CreateReplication(params services.CreateReplicationParams) error 55 UpdateReplication(params services.UpdateReplicationParams) error 56 DeleteReplication(repoKey string) error 57 GetReplication(repoKey string) ([]utils.ReplicationParams, error) 58 GetVersion() (string, error) 59 GetServiceId() (string, error) 60 PromoteDocker(params services.DockerPromoteParams) error 61 Client() *rthttpclient.ArtifactoryHttpClient 62 } 63 64 // By using this struct, you have the option of overriding only some of the ArtifactoryServicesManager 65 // interface's methods, but still implement this interface. 66 // This comes in very handy for tests. 67 type EmptyArtifactoryServicesManager struct { 68 } 69 70 func (esm *EmptyArtifactoryServicesManager) CreateLocalRepository() *services.LocalRepositoryService { 71 panic("Failed: Method is not implemented") 72 } 73 74 func (esm *EmptyArtifactoryServicesManager) CreateRemoteRepository() *services.RemoteRepositoryService { 75 panic("Failed: Method is not implemented") 76 } 77 78 func (esm *EmptyArtifactoryServicesManager) CreateVirtualRepository() *services.VirtualRepositoryService { 79 panic("Failed: Method is not implemented") 80 } 81 82 func (esm *EmptyArtifactoryServicesManager) UpdateLocalRepository() *services.LocalRepositoryService { 83 panic("Failed: Method is not implemented") 84 } 85 86 func (esm *EmptyArtifactoryServicesManager) UpdateRemoteRepository() *services.RemoteRepositoryService { 87 panic("Failed: Method is not implemented") 88 } 89 90 func (esm *EmptyArtifactoryServicesManager) UpdateVirtualRepository() *services.VirtualRepositoryService { 91 panic("Failed: Method is not implemented") 92 } 93 94 func (esm *EmptyArtifactoryServicesManager) DeleteRepository(repoKey string) error { 95 panic("Failed: Method is not implemented") 96 } 97 98 func (esm *EmptyArtifactoryServicesManager) GetRepository(repoKey string) (*services.RepositoryDetails, error) { 99 panic("Failed: Method is not implemented") 100 } 101 102 func (esm *EmptyArtifactoryServicesManager) CreatePermissionTarget(params services.PermissionTargetParams) error { 103 panic("Failed: Method is not implemented") 104 } 105 106 func (esm *EmptyArtifactoryServicesManager) UpdatePermissionTarget(params services.PermissionTargetParams) error { 107 panic("Failed: Method is not implemented") 108 } 109 110 func (esm *EmptyArtifactoryServicesManager) DeletePermissionTarget(permissionTargetName string) error { 111 panic("Failed: Method is not implemented") 112 } 113 114 func (esm *EmptyArtifactoryServicesManager) PublishBuildInfo(build *buildinfo.BuildInfo) error { 115 panic("Failed: Method is not implemented") 116 } 117 118 func (esm *EmptyArtifactoryServicesManager) DistributeBuild(params services.BuildDistributionParams) error { 119 panic("Failed: Method is not implemented") 120 } 121 122 func (esm *EmptyArtifactoryServicesManager) PromoteBuild(params services.PromotionParams) error { 123 panic("Failed: Method is not implemented") 124 } 125 126 func (esm *EmptyArtifactoryServicesManager) DiscardBuilds(params services.DiscardBuildsParams) error { 127 panic("Failed: Method is not implemented") 128 } 129 130 func (esm *EmptyArtifactoryServicesManager) XrayScanBuild(params services.XrayScanParams) ([]byte, error) { 131 panic("Failed: Method is not implemented") 132 } 133 134 func (esm *EmptyArtifactoryServicesManager) GetPathsToDelete(params services.DeleteParams) (*content.ContentReader, error) { 135 panic("Failed: Method is not implemented") 136 } 137 138 func (esm *EmptyArtifactoryServicesManager) DeleteFiles(reader *content.ContentReader) (int, error) { 139 panic("Failed: Method is not implemented") 140 } 141 142 func (esm *EmptyArtifactoryServicesManager) ReadRemoteFile(readPath string) (io.ReadCloser, error) { 143 panic("Failed: Method is not implemented") 144 } 145 146 func (esm *EmptyArtifactoryServicesManager) initDownloadService() *services.DownloadService { 147 panic("Failed: Method is not implemented") 148 } 149 150 func (esm *EmptyArtifactoryServicesManager) DownloadFiles(params ...services.DownloadParams) (totalDownloaded, totalExpected int, err error) { 151 panic("Failed: Method is not implemented") 152 } 153 154 func (esm *EmptyArtifactoryServicesManager) DownloadFilesWithResultReader(params ...services.DownloadParams) (resultReader *content.ContentReader, totalDownloaded, totalExpected int, err error) { 155 panic("Failed: Method is not implemented") 156 } 157 158 func (esm *EmptyArtifactoryServicesManager) GetUnreferencedGitLfsFiles(params services.GitLfsCleanParams) (*content.ContentReader, error) { 159 panic("Failed: Method is not implemented") 160 } 161 162 func (esm *EmptyArtifactoryServicesManager) SearchFiles(params services.SearchParams) (*content.ContentReader, error) { 163 panic("Failed: Method is not implemented") 164 } 165 166 func (esm *EmptyArtifactoryServicesManager) Aql(aql string) (io.ReadCloser, error) { 167 panic("Failed: Method is not implemented") 168 } 169 170 func (esm *EmptyArtifactoryServicesManager) SetProps(params services.PropsParams) (int, error) { 171 panic("Failed: Method is not implemented") 172 } 173 174 func (esm *EmptyArtifactoryServicesManager) DeleteProps(params services.PropsParams) (int, error) { 175 panic("Failed: Method is not implemented") 176 } 177 178 func (esm *EmptyArtifactoryServicesManager) UploadFiles(params ...services.UploadParams) (artifactsFileInfo []utils.FileInfo, totalUploaded, totalFailed int, err error) { 179 panic("Failed: Method is not implemented") 180 } 181 182 func (esm *EmptyArtifactoryServicesManager) Copy(params services.MoveCopyParams) (successCount, failedCount int, err error) { 183 panic("Failed: Method is not implemented") 184 } 185 186 func (esm *EmptyArtifactoryServicesManager) Move(params services.MoveCopyParams) (successCount, failedCount int, err error) { 187 panic("Failed: Method is not implemented") 188 } 189 190 func (esm *EmptyArtifactoryServicesManager) PublishGoProject(params _go.GoParams) error { 191 panic("Failed: Method is not implemented") 192 } 193 194 func (esm *EmptyArtifactoryServicesManager) Ping() ([]byte, error) { 195 panic("Failed: Method is not implemented") 196 } 197 198 func (esm *EmptyArtifactoryServicesManager) GetConfig() config.Config { 199 panic("Failed: Method is not implemented") 200 } 201 202 func (esm *EmptyArtifactoryServicesManager) GetBuildInfo(params services.BuildInfoParams) (*buildinfo.BuildInfo, error) { 203 panic("Failed: Method is not implemented") 204 } 205 206 func (esm *EmptyArtifactoryServicesManager) CreateToken(params services.CreateTokenParams) (services.CreateTokenResponseData, error) { 207 panic("Failed: Method is not implemented") 208 } 209 210 func (esm *EmptyArtifactoryServicesManager) GetTokens() (services.GetTokensResponseData, error) { 211 panic("Failed: Method is not implemented") 212 } 213 214 func (esm *EmptyArtifactoryServicesManager) RefreshToken(params services.RefreshTokenParams) (services.CreateTokenResponseData, error) { 215 panic("Failed: Method is not implemented") 216 } 217 218 func (esm *EmptyArtifactoryServicesManager) RevokeToken(params services.RevokeTokenParams) (string, error) { 219 panic("Failed: Method is not implemented") 220 } 221 222 func (esm *EmptyArtifactoryServicesManager) CreateReplication(params services.CreateReplicationParams) error { 223 panic("Failed: Method is not implemented") 224 } 225 226 func (esm *EmptyArtifactoryServicesManager) UpdateReplication(params services.UpdateReplicationParams) error { 227 panic("Failed: Method is not implemented") 228 } 229 230 func (esm *EmptyArtifactoryServicesManager) DeleteReplication(repoKey string) error { 231 panic("Failed: Method is not implemented") 232 } 233 234 func (esm *EmptyArtifactoryServicesManager) GetReplication(repoKey string) ([]utils.ReplicationParams, error) { 235 panic("Failed: Method is not implemented") 236 } 237 238 func (esm *EmptyArtifactoryServicesManager) GetVersion() (string, error) { 239 panic("Failed: Method is not implemented") 240 } 241 242 func (esm *EmptyArtifactoryServicesManager) GetServiceId() (string, error) { 243 panic("Failed: Method is not implemented") 244 } 245 246 func (esm *EmptyArtifactoryServicesManager) PromoteDocker(params services.DockerPromoteParams) error { 247 panic("Failed: Method is not implemented") 248 } 249 250 func (esm *EmptyArtifactoryServicesManager) Client() *rthttpclient.ArtifactoryHttpClient { 251 panic("Failed: Method is not implemented") 252 }