github.com/cobalt77/jfrog-client-go@v0.14.5/artifactory/services/aql.go (about) 1 package services 2 3 import ( 4 "io" 5 6 rthttpclient "github.com/cobalt77/jfrog-client-go/artifactory/httpclient" 7 "github.com/cobalt77/jfrog-client-go/artifactory/services/utils" 8 "github.com/cobalt77/jfrog-client-go/auth" 9 ) 10 11 type AqlService struct { 12 client *rthttpclient.ArtifactoryHttpClient 13 ArtDetails auth.ServiceDetails 14 } 15 16 func NewAqlService(client *rthttpclient.ArtifactoryHttpClient) *AqlService { 17 return &AqlService{client: client} 18 } 19 20 func (s *AqlService) GetArtifactoryDetails() auth.ServiceDetails { 21 return s.ArtDetails 22 } 23 24 func (s *AqlService) SetArtifactoryDetails(rt auth.ServiceDetails) { 25 s.ArtDetails = rt 26 } 27 28 func (s *AqlService) IsDryRun() bool { 29 return false 30 } 31 32 func (s *AqlService) GetJfrogHttpClient() (*rthttpclient.ArtifactoryHttpClient, error) { 33 return s.client, nil 34 } 35 36 func (s *AqlService) ExecAql(aql string) (io.ReadCloser, error) { 37 return s.exec(aql) 38 } 39 40 func (s *AqlService) exec(aql string) (io.ReadCloser, error) { 41 return utils.ExecAql(aql, s) 42 }