forked from jfrog/jfrog-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aql.go
40 lines (31 loc) · 976 Bytes
/
aql.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package services
import (
"github.com/jfrog/jfrog-client-go/artifactory/auth"
rthttpclient "github.com/jfrog/jfrog-client-go/artifactory/httpclient"
"github.com/jfrog/jfrog-client-go/artifactory/services/utils"
)
type AqlService struct {
client *rthttpclient.ArtifactoryHttpClient
ArtDetails auth.ArtifactoryDetails
}
func NewAqlService(client *rthttpclient.ArtifactoryHttpClient) *AqlService {
return &AqlService{client: client}
}
func (s *AqlService) GetArtifactoryDetails() auth.ArtifactoryDetails {
return s.ArtDetails
}
func (s *AqlService) SetArtifactoryDetails(rt auth.ArtifactoryDetails) {
s.ArtDetails = rt
}
func (s *AqlService) IsDryRun() bool {
return false
}
func (s *AqlService) GetJfrogHttpClient() (*rthttpclient.ArtifactoryHttpClient, error) {
return s.client, nil
}
func (s *AqlService) ExecAql(aql string) ([]byte, error) {
return s.exec(aql)
}
func (s *AqlService) exec(aql string) ([]byte, error) {
return utils.ExecAql(aql, s)
}