Rename module
This change renames the module from "garm" to "github.com/cloudbase/garm". This will make it easier to consume public functions defined in garm, by external applications, without having to resort to replace. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
24f61ceb8c
commit
829db87f15
87 changed files with 638 additions and 362 deletions
2
Makefile
2
Makefile
|
|
@ -37,7 +37,7 @@ fmt:
|
||||||
@$(GO) fmt $$(go list ./...)
|
@$(GO) fmt $$(go list ./...)
|
||||||
|
|
||||||
fmtcheck:
|
fmtcheck:
|
||||||
@gofmt -l -s $$(go list ./... | sed 's|garm/||g') | grep ".*\.go"; if [ "$$?" -eq 0 ]; then echo "gofmt check failed; please tun gofmt -w -s"; exit 1;fi
|
@gofmt -l -s $$(go list ./... | sed 's|github.com/cloudbase/garm/||g') | grep ".*\.go"; if [ "$$?" -eq 0 ]; then echo "gofmt check failed; please tun gofmt -w -s"; exit 1;fi
|
||||||
|
|
||||||
verify-vendor: ## verify if all the go.mod/go.sum files are up-to-date
|
verify-vendor: ## verify if all the go.mod/go.sum files are up-to-date
|
||||||
$(eval TMPDIR := $(shell mktemp -d))
|
$(eval TMPDIR := $(shell mktemp -d))
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,14 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/metrics"
|
"github.com/cloudbase/garm/metrics"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
"garm/runner"
|
"github.com/cloudbase/garm/runner"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
wsWriter "garm/websocket"
|
wsWriter "github.com/cloudbase/garm/websocket"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
gErrors "garm/errors"
|
gErrors "github.com/cloudbase/garm/errors"
|
||||||
runnerParams "garm/params"
|
runnerParams "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
|
||||||
"garm/apiserver/controllers"
|
"github.com/cloudbase/garm/apiserver/controllers"
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func WithMetricsRouter(parentRouter *mux.Router, disableAuth bool, metricsMiddlerware auth.Middleware) *mux.Router {
|
func WithMetricsRouter(parentRouter *mux.Router, disableAuth bool, metricsMiddlerware auth.Middleware) *mux.Router {
|
||||||
|
|
|
||||||
11
auth/auth.go
11
auth/auth.go
|
|
@ -16,13 +16,14 @@ package auth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"garm/config"
|
|
||||||
"garm/database/common"
|
|
||||||
runnerErrors "garm/errors"
|
|
||||||
"garm/params"
|
|
||||||
"garm/util"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
"github.com/cloudbase/garm/database/common"
|
||||||
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt"
|
"github.com/golang-jwt/jwt"
|
||||||
"github.com/nbutton23/zxcvbn-go"
|
"github.com/nbutton23/zxcvbn-go"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ package auth
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/providers/common"
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type contextFlags string
|
type contextFlags string
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"garm/apiserver/params"
|
"github.com/cloudbase/garm/apiserver/params"
|
||||||
"garm/database/common"
|
"github.com/cloudbase/garm/database/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewjwtMiddleware returns a populated jwtMiddleware
|
// NewjwtMiddleware returns a populated jwtMiddleware
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,12 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
providerCommon "garm/runner/providers/common"
|
providerCommon "github.com/cloudbase/garm/runner/providers/common"
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt"
|
"github.com/golang-jwt/jwt"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
apiParams "garm/apiserver/params"
|
apiParams "github.com/cloudbase/garm/apiserver/params"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt"
|
"github.com/golang-jwt/jwt"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@ package auth
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/config"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt"
|
"github.com/golang-jwt/jwt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,11 @@ import (
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/config"
|
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
apiParams "garm/apiserver/params"
|
apiParams "github.com/cloudbase/garm/apiserver/params"
|
||||||
"garm/cmd/garm-cli/config"
|
"github.com/cloudbase/garm/cmd/garm-cli/config"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Client) ListEnterprises() ([]params.Enterprise, error) {
|
func (c *Client) ListEnterprises() ([]params.Enterprise, error) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Client) ListOrganizations() ([]params.Organization, error) {
|
func (c *Client) ListOrganizations() ([]params.Organization, error) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Client) ListRepositories() ([]params.Repository, error) {
|
func (c *Client) ListRepositories() ([]params.Repository, error) {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"garm/cmd/garm-cli/common"
|
"github.com/cloudbase/garm/cmd/garm-cli/common"
|
||||||
"garm/cmd/garm-cli/config"
|
"github.com/cloudbase/garm/cmd/garm-cli/config"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
apiParams "garm/apiserver/params"
|
apiParams "github.com/cloudbase/garm/apiserver/params"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@ package cmd
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/config"
|
|
||||||
"garm/params"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,12 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/cmd/garm-cli/common"
|
|
||||||
"garm/cmd/garm-cli/config"
|
|
||||||
"garm/params"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/cmd/garm-cli/common"
|
||||||
|
"github.com/cloudbase/garm/cmd/garm-cli/config"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/cmd/garm-cli/client"
|
|
||||||
"garm/cmd/garm-cli/config"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/cmd/garm-cli/client"
|
||||||
|
"github.com/cloudbase/garm/cmd/garm-cli/config"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/jedib0t/go-pretty/v6/table"
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "garm/cmd/garm-cli/cmd"
|
import "github.com/cloudbase/garm/cmd/garm-cli/cmd"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
|
|
|
||||||
|
|
@ -26,16 +26,16 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"garm/apiserver/controllers"
|
"github.com/cloudbase/garm/apiserver/controllers"
|
||||||
"garm/apiserver/routers"
|
"github.com/cloudbase/garm/apiserver/routers"
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database"
|
"github.com/cloudbase/garm/database"
|
||||||
"garm/database/common"
|
"github.com/cloudbase/garm/database/common"
|
||||||
"garm/metrics"
|
"github.com/cloudbase/garm/metrics"
|
||||||
"garm/runner"
|
"github.com/cloudbase/garm/runner"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
"garm/websocket"
|
"github.com/cloudbase/garm/websocket"
|
||||||
|
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"garm/util/exec"
|
"github.com/cloudbase/garm/util/exec"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RepoStore interface {
|
type RepoStore interface {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
params "garm/params"
|
|
||||||
|
|
||||||
|
params "github.com/cloudbase/garm/params"
|
||||||
mock "github.com/stretchr/testify/mock"
|
mock "github.com/stretchr/testify/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ type Store struct {
|
||||||
mock.Mock
|
mock.Mock
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddInstanceEvent provides a mock function with given fields: ctx, instanceID, event, statusMessage
|
// AddInstanceEvent provides a mock function with given fields: ctx, instanceID, event, eventLevel, eventMessage
|
||||||
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceID string, event params.EventType, statusMessage string) error {
|
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceID string, event params.EventType, eventLevel params.EventLevel, eventMessage string) error {
|
||||||
ret := _m.Called(ctx, instanceID, event, statusMessage)
|
ret := _m.Called(ctx, instanceID, event, eventLevel, eventMessage)
|
||||||
|
|
||||||
var r0 error
|
var r0 error
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, string) error); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel, string) error); ok {
|
||||||
r0 = rf(ctx, instanceID, event, statusMessage)
|
r0 = rf(ctx, instanceID, event, eventLevel, eventMessage)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Error(0)
|
r0 = ret.Error(0)
|
||||||
}
|
}
|
||||||
|
|
@ -33,13 +33,16 @@ func (_m *Store) ControllerInfo() (params.ControllerInfo, error) {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 params.ControllerInfo
|
var r0 params.ControllerInfo
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (params.ControllerInfo, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
|
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.ControllerInfo)
|
r0 = ret.Get(0).(params.ControllerInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -54,13 +57,16 @@ func (_m *Store) CreateEnterprise(ctx context.Context, name string, credentialsN
|
||||||
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
|
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
|
||||||
|
|
||||||
var r0 params.Enterprise
|
var r0 params.Enterprise
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (params.Enterprise, error)); ok {
|
||||||
|
return rf(ctx, name, credentialsName, webhookSecret)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Enterprise); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Enterprise); ok {
|
||||||
r0 = rf(ctx, name, credentialsName, webhookSecret)
|
r0 = rf(ctx, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Enterprise)
|
r0 = ret.Get(0).(params.Enterprise)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
|
||||||
r1 = rf(ctx, name, credentialsName, webhookSecret)
|
r1 = rf(ctx, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -75,13 +81,16 @@ func (_m *Store) CreateEnterprisePool(ctx context.Context, enterpriseID string,
|
||||||
ret := _m.Called(ctx, enterpriseID, param)
|
ret := _m.Called(ctx, enterpriseID, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, enterpriseID, param)
|
r0 = rf(ctx, enterpriseID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID, param)
|
r1 = rf(ctx, enterpriseID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -96,13 +105,16 @@ func (_m *Store) CreateInstance(ctx context.Context, poolID string, param params
|
||||||
ret := _m.Called(ctx, poolID, param)
|
ret := _m.Called(ctx, poolID, param)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreateInstanceParams) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, poolID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreateInstanceParams) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreateInstanceParams) params.Instance); ok {
|
||||||
r0 = rf(ctx, poolID, param)
|
r0 = rf(ctx, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreateInstanceParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreateInstanceParams) error); ok {
|
||||||
r1 = rf(ctx, poolID, param)
|
r1 = rf(ctx, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -117,13 +129,16 @@ func (_m *Store) CreateOrganization(ctx context.Context, name string, credential
|
||||||
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
|
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
|
||||||
|
|
||||||
var r0 params.Organization
|
var r0 params.Organization
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (params.Organization, error)); ok {
|
||||||
|
return rf(ctx, name, credentialsName, webhookSecret)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Organization); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Organization); ok {
|
||||||
r0 = rf(ctx, name, credentialsName, webhookSecret)
|
r0 = rf(ctx, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Organization)
|
r0 = ret.Get(0).(params.Organization)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
|
||||||
r1 = rf(ctx, name, credentialsName, webhookSecret)
|
r1 = rf(ctx, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -138,13 +153,16 @@ func (_m *Store) CreateOrganizationPool(ctx context.Context, orgId string, param
|
||||||
ret := _m.Called(ctx, orgId, param)
|
ret := _m.Called(ctx, orgId, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, orgId, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, orgId, param)
|
r0 = rf(ctx, orgId, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, orgId, param)
|
r1 = rf(ctx, orgId, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -159,13 +177,16 @@ func (_m *Store) CreateRepository(ctx context.Context, owner string, name string
|
||||||
ret := _m.Called(ctx, owner, name, credentialsName, webhookSecret)
|
ret := _m.Called(ctx, owner, name, credentialsName, webhookSecret)
|
||||||
|
|
||||||
var r0 params.Repository
|
var r0 params.Repository
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (params.Repository, error)); ok {
|
||||||
|
return rf(ctx, owner, name, credentialsName, webhookSecret)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) params.Repository); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) params.Repository); ok {
|
||||||
r0 = rf(ctx, owner, name, credentialsName, webhookSecret)
|
r0 = rf(ctx, owner, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Repository)
|
r0 = ret.Get(0).(params.Repository)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok {
|
||||||
r1 = rf(ctx, owner, name, credentialsName, webhookSecret)
|
r1 = rf(ctx, owner, name, credentialsName, webhookSecret)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -180,13 +201,16 @@ func (_m *Store) CreateRepositoryPool(ctx context.Context, repoId string, param
|
||||||
ret := _m.Called(ctx, repoId, param)
|
ret := _m.Called(ctx, repoId, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, repoId, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, repoId, param)
|
r0 = rf(ctx, repoId, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, repoId, param)
|
r1 = rf(ctx, repoId, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -201,13 +225,16 @@ func (_m *Store) CreateUser(ctx context.Context, user params.NewUserParams) (par
|
||||||
ret := _m.Called(ctx, user)
|
ret := _m.Called(ctx, user)
|
||||||
|
|
||||||
var r0 params.User
|
var r0 params.User
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, params.NewUserParams) (params.User, error)); ok {
|
||||||
|
return rf(ctx, user)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, params.NewUserParams) params.User); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, params.NewUserParams) params.User); ok {
|
||||||
r0 = rf(ctx, user)
|
r0 = rf(ctx, user)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.User)
|
r0 = ret.Get(0).(params.User)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, params.NewUserParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, params.NewUserParams) error); ok {
|
||||||
r1 = rf(ctx, user)
|
r1 = rf(ctx, user)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -334,13 +361,16 @@ func (_m *Store) FindEnterprisePoolByTags(ctx context.Context, enterpriseID stri
|
||||||
ret := _m.Called(ctx, enterpriseID, tags)
|
ret := _m.Called(ctx, enterpriseID, tags)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID, tags)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
||||||
r0 = rf(ctx, enterpriseID, tags)
|
r0 = rf(ctx, enterpriseID, tags)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID, tags)
|
r1 = rf(ctx, enterpriseID, tags)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -355,13 +385,16 @@ func (_m *Store) FindOrganizationPoolByTags(ctx context.Context, orgID string, t
|
||||||
ret := _m.Called(ctx, orgID, tags)
|
ret := _m.Called(ctx, orgID, tags)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, orgID, tags)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
||||||
r0 = rf(ctx, orgID, tags)
|
r0 = rf(ctx, orgID, tags)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
||||||
r1 = rf(ctx, orgID, tags)
|
r1 = rf(ctx, orgID, tags)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -376,13 +409,16 @@ func (_m *Store) FindRepositoryPoolByTags(ctx context.Context, repoID string, ta
|
||||||
ret := _m.Called(ctx, repoID, tags)
|
ret := _m.Called(ctx, repoID, tags)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, repoID, tags)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
|
||||||
r0 = rf(ctx, repoID, tags)
|
r0 = rf(ctx, repoID, tags)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
|
||||||
r1 = rf(ctx, repoID, tags)
|
r1 = rf(ctx, repoID, tags)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -397,13 +433,16 @@ func (_m *Store) GetEnterprise(ctx context.Context, name string) (params.Enterpr
|
||||||
ret := _m.Called(ctx, name)
|
ret := _m.Called(ctx, name)
|
||||||
|
|
||||||
var r0 params.Enterprise
|
var r0 params.Enterprise
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Enterprise, error)); ok {
|
||||||
|
return rf(ctx, name)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
|
||||||
r0 = rf(ctx, name)
|
r0 = rf(ctx, name)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Enterprise)
|
r0 = ret.Get(0).(params.Enterprise)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, name)
|
r1 = rf(ctx, name)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -418,13 +457,16 @@ func (_m *Store) GetEnterpriseByID(ctx context.Context, enterpriseID string) (pa
|
||||||
ret := _m.Called(ctx, enterpriseID)
|
ret := _m.Called(ctx, enterpriseID)
|
||||||
|
|
||||||
var r0 params.Enterprise
|
var r0 params.Enterprise
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Enterprise, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
|
||||||
r0 = rf(ctx, enterpriseID)
|
r0 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Enterprise)
|
r0 = ret.Get(0).(params.Enterprise)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID)
|
r1 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -439,13 +481,16 @@ func (_m *Store) GetEnterprisePool(ctx context.Context, enterpriseID string, poo
|
||||||
ret := _m.Called(ctx, enterpriseID, poolID)
|
ret := _m.Called(ctx, enterpriseID, poolID)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
||||||
r0 = rf(ctx, enterpriseID, poolID)
|
r0 = rf(ctx, enterpriseID, poolID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID, poolID)
|
r1 = rf(ctx, enterpriseID, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -460,13 +505,16 @@ func (_m *Store) GetInstanceByName(ctx context.Context, instanceName string) (pa
|
||||||
ret := _m.Called(ctx, instanceName)
|
ret := _m.Called(ctx, instanceName)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, instanceName)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
|
||||||
r0 = rf(ctx, instanceName)
|
r0 = rf(ctx, instanceName)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, instanceName)
|
r1 = rf(ctx, instanceName)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -481,13 +529,16 @@ func (_m *Store) GetOrganization(ctx context.Context, name string) (params.Organ
|
||||||
ret := _m.Called(ctx, name)
|
ret := _m.Called(ctx, name)
|
||||||
|
|
||||||
var r0 params.Organization
|
var r0 params.Organization
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Organization, error)); ok {
|
||||||
|
return rf(ctx, name)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
|
||||||
r0 = rf(ctx, name)
|
r0 = rf(ctx, name)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Organization)
|
r0 = ret.Get(0).(params.Organization)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, name)
|
r1 = rf(ctx, name)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -502,13 +553,16 @@ func (_m *Store) GetOrganizationByID(ctx context.Context, orgID string) (params.
|
||||||
ret := _m.Called(ctx, orgID)
|
ret := _m.Called(ctx, orgID)
|
||||||
|
|
||||||
var r0 params.Organization
|
var r0 params.Organization
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Organization, error)); ok {
|
||||||
|
return rf(ctx, orgID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
|
||||||
r0 = rf(ctx, orgID)
|
r0 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Organization)
|
r0 = ret.Get(0).(params.Organization)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, orgID)
|
r1 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -523,13 +577,16 @@ func (_m *Store) GetOrganizationPool(ctx context.Context, orgID string, poolID s
|
||||||
ret := _m.Called(ctx, orgID, poolID)
|
ret := _m.Called(ctx, orgID, poolID)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, orgID, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
||||||
r0 = rf(ctx, orgID, poolID)
|
r0 = rf(ctx, orgID, poolID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||||
r1 = rf(ctx, orgID, poolID)
|
r1 = rf(ctx, orgID, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -544,13 +601,16 @@ func (_m *Store) GetPoolByID(ctx context.Context, poolID string) (params.Pool, e
|
||||||
ret := _m.Called(ctx, poolID)
|
ret := _m.Called(ctx, poolID)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Pool); ok {
|
||||||
r0 = rf(ctx, poolID)
|
r0 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, poolID)
|
r1 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -565,13 +625,16 @@ func (_m *Store) GetPoolInstanceByName(ctx context.Context, poolID string, insta
|
||||||
ret := _m.Called(ctx, poolID, instanceName)
|
ret := _m.Called(ctx, poolID, instanceName)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, poolID, instanceName)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Instance); ok {
|
||||||
r0 = rf(ctx, poolID, instanceName)
|
r0 = rf(ctx, poolID, instanceName)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||||
r1 = rf(ctx, poolID, instanceName)
|
r1 = rf(ctx, poolID, instanceName)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -586,13 +649,16 @@ func (_m *Store) GetRepository(ctx context.Context, owner string, name string) (
|
||||||
ret := _m.Called(ctx, owner, name)
|
ret := _m.Called(ctx, owner, name)
|
||||||
|
|
||||||
var r0 params.Repository
|
var r0 params.Repository
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Repository, error)); ok {
|
||||||
|
return rf(ctx, owner, name)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Repository); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Repository); ok {
|
||||||
r0 = rf(ctx, owner, name)
|
r0 = rf(ctx, owner, name)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Repository)
|
r0 = ret.Get(0).(params.Repository)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||||
r1 = rf(ctx, owner, name)
|
r1 = rf(ctx, owner, name)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -607,13 +673,16 @@ func (_m *Store) GetRepositoryByID(ctx context.Context, repoID string) (params.R
|
||||||
ret := _m.Called(ctx, repoID)
|
ret := _m.Called(ctx, repoID)
|
||||||
|
|
||||||
var r0 params.Repository
|
var r0 params.Repository
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Repository, error)); ok {
|
||||||
|
return rf(ctx, repoID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Repository); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Repository); ok {
|
||||||
r0 = rf(ctx, repoID)
|
r0 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Repository)
|
r0 = ret.Get(0).(params.Repository)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, repoID)
|
r1 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -628,13 +697,16 @@ func (_m *Store) GetRepositoryPool(ctx context.Context, repoID string, poolID st
|
||||||
ret := _m.Called(ctx, repoID, poolID)
|
ret := _m.Called(ctx, repoID, poolID)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, repoID, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
|
||||||
r0 = rf(ctx, repoID, poolID)
|
r0 = rf(ctx, repoID, poolID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||||
r1 = rf(ctx, repoID, poolID)
|
r1 = rf(ctx, repoID, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -649,13 +721,16 @@ func (_m *Store) GetUser(ctx context.Context, user string) (params.User, error)
|
||||||
ret := _m.Called(ctx, user)
|
ret := _m.Called(ctx, user)
|
||||||
|
|
||||||
var r0 params.User
|
var r0 params.User
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.User, error)); ok {
|
||||||
|
return rf(ctx, user)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
|
||||||
r0 = rf(ctx, user)
|
r0 = rf(ctx, user)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.User)
|
r0 = ret.Get(0).(params.User)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, user)
|
r1 = rf(ctx, user)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -670,13 +745,16 @@ func (_m *Store) GetUserByID(ctx context.Context, userID string) (params.User, e
|
||||||
ret := _m.Called(ctx, userID)
|
ret := _m.Called(ctx, userID)
|
||||||
|
|
||||||
var r0 params.User
|
var r0 params.User
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.User, error)); ok {
|
||||||
|
return rf(ctx, userID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
|
||||||
r0 = rf(ctx, userID)
|
r0 = rf(ctx, userID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.User)
|
r0 = ret.Get(0).(params.User)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, userID)
|
r1 = rf(ctx, userID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -705,13 +783,16 @@ func (_m *Store) InitController() (params.ControllerInfo, error) {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 params.ControllerInfo
|
var r0 params.ControllerInfo
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (params.ControllerInfo, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
|
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.ControllerInfo)
|
r0 = ret.Get(0).(params.ControllerInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -726,6 +807,10 @@ func (_m *Store) ListAllInstances(ctx context.Context) ([]params.Instance, error
|
||||||
ret := _m.Called(ctx)
|
ret := _m.Called(ctx)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context) []params.Instance); ok {
|
||||||
r0 = rf(ctx)
|
r0 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -734,7 +819,6 @@ func (_m *Store) ListAllInstances(ctx context.Context) ([]params.Instance, error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||||
r1 = rf(ctx)
|
r1 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -749,6 +833,10 @@ func (_m *Store) ListAllPools(ctx context.Context) ([]params.Pool, error) {
|
||||||
ret := _m.Called(ctx)
|
ret := _m.Called(ctx)
|
||||||
|
|
||||||
var r0 []params.Pool
|
var r0 []params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Pool, error)); ok {
|
||||||
|
return rf(ctx)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context) []params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context) []params.Pool); ok {
|
||||||
r0 = rf(ctx)
|
r0 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -757,7 +845,6 @@ func (_m *Store) ListAllPools(ctx context.Context) ([]params.Pool, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||||
r1 = rf(ctx)
|
r1 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -772,6 +859,10 @@ func (_m *Store) ListEnterpriseInstances(ctx context.Context, enterpriseID strin
|
||||||
ret := _m.Called(ctx, enterpriseID)
|
ret := _m.Called(ctx, enterpriseID)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
||||||
r0 = rf(ctx, enterpriseID)
|
r0 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -780,7 +871,6 @@ func (_m *Store) ListEnterpriseInstances(ctx context.Context, enterpriseID strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID)
|
r1 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -795,6 +885,10 @@ func (_m *Store) ListEnterprisePools(ctx context.Context, enterpriseID string) (
|
||||||
ret := _m.Called(ctx, enterpriseID)
|
ret := _m.Called(ctx, enterpriseID)
|
||||||
|
|
||||||
var r0 []params.Pool
|
var r0 []params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
||||||
r0 = rf(ctx, enterpriseID)
|
r0 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -803,7 +897,6 @@ func (_m *Store) ListEnterprisePools(ctx context.Context, enterpriseID string) (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID)
|
r1 = rf(ctx, enterpriseID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -818,6 +911,10 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
|
||||||
ret := _m.Called(ctx)
|
ret := _m.Called(ctx)
|
||||||
|
|
||||||
var r0 []params.Enterprise
|
var r0 []params.Enterprise
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Enterprise, error)); ok {
|
||||||
|
return rf(ctx)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context) []params.Enterprise); ok {
|
if rf, ok := ret.Get(0).(func(context.Context) []params.Enterprise); ok {
|
||||||
r0 = rf(ctx)
|
r0 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -826,7 +923,6 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||||
r1 = rf(ctx)
|
r1 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -836,11 +932,41 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
|
||||||
return r0, r1
|
return r0, r1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ListInstanceEvents provides a mock function with given fields: ctx, instanceID, eventType, eventLevel
|
||||||
|
func (_m *Store) ListInstanceEvents(ctx context.Context, instanceID string, eventType params.EventType, eventLevel params.EventLevel) ([]params.StatusMessage, error) {
|
||||||
|
ret := _m.Called(ctx, instanceID, eventType, eventLevel)
|
||||||
|
|
||||||
|
var r0 []params.StatusMessage
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel) ([]params.StatusMessage, error)); ok {
|
||||||
|
return rf(ctx, instanceID, eventType, eventLevel)
|
||||||
|
}
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel) []params.StatusMessage); ok {
|
||||||
|
r0 = rf(ctx, instanceID, eventType, eventLevel)
|
||||||
|
} else {
|
||||||
|
if ret.Get(0) != nil {
|
||||||
|
r0 = ret.Get(0).([]params.StatusMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.EventType, params.EventLevel) error); ok {
|
||||||
|
r1 = rf(ctx, instanceID, eventType, eventLevel)
|
||||||
|
} else {
|
||||||
|
r1 = ret.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
|
}
|
||||||
|
|
||||||
// ListOrgInstances provides a mock function with given fields: ctx, orgID
|
// ListOrgInstances provides a mock function with given fields: ctx, orgID
|
||||||
func (_m *Store) ListOrgInstances(ctx context.Context, orgID string) ([]params.Instance, error) {
|
func (_m *Store) ListOrgInstances(ctx context.Context, orgID string) ([]params.Instance, error) {
|
||||||
ret := _m.Called(ctx, orgID)
|
ret := _m.Called(ctx, orgID)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx, orgID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
||||||
r0 = rf(ctx, orgID)
|
r0 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -849,7 +975,6 @@ func (_m *Store) ListOrgInstances(ctx context.Context, orgID string) ([]params.I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, orgID)
|
r1 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -864,6 +989,10 @@ func (_m *Store) ListOrgPools(ctx context.Context, orgID string) ([]params.Pool,
|
||||||
ret := _m.Called(ctx, orgID)
|
ret := _m.Called(ctx, orgID)
|
||||||
|
|
||||||
var r0 []params.Pool
|
var r0 []params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
|
||||||
|
return rf(ctx, orgID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
||||||
r0 = rf(ctx, orgID)
|
r0 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -872,7 +1001,6 @@ func (_m *Store) ListOrgPools(ctx context.Context, orgID string) ([]params.Pool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, orgID)
|
r1 = rf(ctx, orgID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -887,6 +1015,10 @@ func (_m *Store) ListOrganizations(ctx context.Context) ([]params.Organization,
|
||||||
ret := _m.Called(ctx)
|
ret := _m.Called(ctx)
|
||||||
|
|
||||||
var r0 []params.Organization
|
var r0 []params.Organization
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Organization, error)); ok {
|
||||||
|
return rf(ctx)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context) []params.Organization); ok {
|
if rf, ok := ret.Get(0).(func(context.Context) []params.Organization); ok {
|
||||||
r0 = rf(ctx)
|
r0 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -895,7 +1027,6 @@ func (_m *Store) ListOrganizations(ctx context.Context) ([]params.Organization,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||||
r1 = rf(ctx)
|
r1 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -910,6 +1041,10 @@ func (_m *Store) ListPoolInstances(ctx context.Context, poolID string) ([]params
|
||||||
ret := _m.Called(ctx, poolID)
|
ret := _m.Called(ctx, poolID)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
||||||
r0 = rf(ctx, poolID)
|
r0 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -918,7 +1053,6 @@ func (_m *Store) ListPoolInstances(ctx context.Context, poolID string) ([]params
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, poolID)
|
r1 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -933,6 +1067,10 @@ func (_m *Store) ListRepoInstances(ctx context.Context, repoID string) ([]params
|
||||||
ret := _m.Called(ctx, repoID)
|
ret := _m.Called(ctx, repoID)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx, repoID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
||||||
r0 = rf(ctx, repoID)
|
r0 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -941,7 +1079,6 @@ func (_m *Store) ListRepoInstances(ctx context.Context, repoID string) ([]params
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, repoID)
|
r1 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -956,6 +1093,10 @@ func (_m *Store) ListRepoPools(ctx context.Context, repoID string) ([]params.Poo
|
||||||
ret := _m.Called(ctx, repoID)
|
ret := _m.Called(ctx, repoID)
|
||||||
|
|
||||||
var r0 []params.Pool
|
var r0 []params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
|
||||||
|
return rf(ctx, repoID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
|
||||||
r0 = rf(ctx, repoID)
|
r0 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -964,7 +1105,6 @@ func (_m *Store) ListRepoPools(ctx context.Context, repoID string) ([]params.Poo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, repoID)
|
r1 = rf(ctx, repoID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -979,6 +1119,10 @@ func (_m *Store) ListRepositories(ctx context.Context) ([]params.Repository, err
|
||||||
ret := _m.Called(ctx)
|
ret := _m.Called(ctx)
|
||||||
|
|
||||||
var r0 []params.Repository
|
var r0 []params.Repository
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Repository, error)); ok {
|
||||||
|
return rf(ctx)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context) []params.Repository); ok {
|
if rf, ok := ret.Get(0).(func(context.Context) []params.Repository); ok {
|
||||||
r0 = rf(ctx)
|
r0 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -987,7 +1131,6 @@ func (_m *Store) ListRepositories(ctx context.Context) ([]params.Repository, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||||
r1 = rf(ctx)
|
r1 = rf(ctx)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1002,13 +1145,16 @@ func (_m *Store) PoolInstanceCount(ctx context.Context, poolID string) (int64, e
|
||||||
ret := _m.Called(ctx, poolID)
|
ret := _m.Called(ctx, poolID)
|
||||||
|
|
||||||
var r0 int64
|
var r0 int64
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
|
||||||
|
return rf(ctx, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok {
|
||||||
r0 = rf(ctx, poolID)
|
r0 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(int64)
|
r0 = ret.Get(0).(int64)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, poolID)
|
r1 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1023,13 +1169,16 @@ func (_m *Store) UpdateEnterprise(ctx context.Context, enterpriseID string, para
|
||||||
ret := _m.Called(ctx, enterpriseID, param)
|
ret := _m.Called(ctx, enterpriseID, param)
|
||||||
|
|
||||||
var r0 params.Enterprise
|
var r0 params.Enterprise
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Enterprise, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Enterprise); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Enterprise); ok {
|
||||||
r0 = rf(ctx, enterpriseID, param)
|
r0 = rf(ctx, enterpriseID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Enterprise)
|
r0 = ret.Get(0).(params.Enterprise)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID, param)
|
r1 = rf(ctx, enterpriseID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1044,13 +1193,16 @@ func (_m *Store) UpdateEnterprisePool(ctx context.Context, enterpriseID string,
|
||||||
ret := _m.Called(ctx, enterpriseID, poolID, param)
|
ret := _m.Called(ctx, enterpriseID, poolID, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, enterpriseID, poolID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, enterpriseID, poolID, param)
|
r0 = rf(ctx, enterpriseID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, enterpriseID, poolID, param)
|
r1 = rf(ctx, enterpriseID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1065,13 +1217,16 @@ func (_m *Store) UpdateInstance(ctx context.Context, instanceID string, param pa
|
||||||
ret := _m.Called(ctx, instanceID, param)
|
ret := _m.Called(ctx, instanceID, param)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, instanceID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) params.Instance); ok {
|
||||||
r0 = rf(ctx, instanceID, param)
|
r0 = rf(ctx, instanceID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateInstanceParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateInstanceParams) error); ok {
|
||||||
r1 = rf(ctx, instanceID, param)
|
r1 = rf(ctx, instanceID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1086,13 +1241,16 @@ func (_m *Store) UpdateOrganization(ctx context.Context, orgID string, param par
|
||||||
ret := _m.Called(ctx, orgID, param)
|
ret := _m.Called(ctx, orgID, param)
|
||||||
|
|
||||||
var r0 params.Organization
|
var r0 params.Organization
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Organization, error)); ok {
|
||||||
|
return rf(ctx, orgID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Organization); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Organization); ok {
|
||||||
r0 = rf(ctx, orgID, param)
|
r0 = rf(ctx, orgID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Organization)
|
r0 = ret.Get(0).(params.Organization)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
||||||
r1 = rf(ctx, orgID, param)
|
r1 = rf(ctx, orgID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1107,13 +1265,16 @@ func (_m *Store) UpdateOrganizationPool(ctx context.Context, orgID string, poolI
|
||||||
ret := _m.Called(ctx, orgID, poolID, param)
|
ret := _m.Called(ctx, orgID, poolID, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, orgID, poolID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, orgID, poolID, param)
|
r0 = rf(ctx, orgID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, orgID, poolID, param)
|
r1 = rf(ctx, orgID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1128,13 +1289,16 @@ func (_m *Store) UpdateRepository(ctx context.Context, repoID string, param para
|
||||||
ret := _m.Called(ctx, repoID, param)
|
ret := _m.Called(ctx, repoID, param)
|
||||||
|
|
||||||
var r0 params.Repository
|
var r0 params.Repository
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Repository, error)); ok {
|
||||||
|
return rf(ctx, repoID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Repository); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Repository); ok {
|
||||||
r0 = rf(ctx, repoID, param)
|
r0 = rf(ctx, repoID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Repository)
|
r0 = ret.Get(0).(params.Repository)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
|
||||||
r1 = rf(ctx, repoID, param)
|
r1 = rf(ctx, repoID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1149,13 +1313,16 @@ func (_m *Store) UpdateRepositoryPool(ctx context.Context, repoID string, poolID
|
||||||
ret := _m.Called(ctx, repoID, poolID, param)
|
ret := _m.Called(ctx, repoID, poolID, param)
|
||||||
|
|
||||||
var r0 params.Pool
|
var r0 params.Pool
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
|
||||||
|
return rf(ctx, repoID, poolID, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
|
||||||
r0 = rf(ctx, repoID, poolID, param)
|
r0 = rf(ctx, repoID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Pool)
|
r0 = ret.Get(0).(params.Pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
|
||||||
r1 = rf(ctx, repoID, poolID, param)
|
r1 = rf(ctx, repoID, poolID, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1170,13 +1337,16 @@ func (_m *Store) UpdateUser(ctx context.Context, user string, param params.Updat
|
||||||
ret := _m.Called(ctx, user, param)
|
ret := _m.Called(ctx, user, param)
|
||||||
|
|
||||||
var r0 params.User
|
var r0 params.User
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateUserParams) (params.User, error)); ok {
|
||||||
|
return rf(ctx, user, param)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateUserParams) params.User); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateUserParams) params.User); ok {
|
||||||
r0 = rf(ctx, user, param)
|
r0 = rf(ctx, user, param)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.User)
|
r0 = ret.Get(0).(params.User)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateUserParams) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateUserParams) error); ok {
|
||||||
r1 = rf(ctx, user, param)
|
r1 = rf(ctx, user, param)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,10 @@ package database
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/config"
|
|
||||||
"garm/database/common"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database/sql"
|
"github.com/cloudbase/garm/database/common"
|
||||||
|
"github.com/cloudbase/garm/database/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewDatabase(ctx context.Context, cfg config.Database) (common.Store, error) {
|
func NewDatabase(ctx context.Context, cfg config.Database) (common.Store, error) {
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
package sql
|
package sql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@ package sql
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
dbCommon "garm/database/common"
|
|
||||||
runnerErrors "garm/errors"
|
|
||||||
garmTesting "garm/internal/testing"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ package sql
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,11 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
"github.com/cloudbase/garm/params"
|
||||||
runnerErrors "garm/errors"
|
|
||||||
garmTesting "garm/internal/testing"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
"garm/params"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ package sql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
runnerErrors "garm/errors"
|
|
||||||
"garm/params"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,15 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
dbCommon "garm/database/common"
|
|
||||||
garmTesting "garm/internal/testing"
|
|
||||||
"garm/params"
|
|
||||||
"garm/runner/providers/common"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
|
|
||||||
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,12 @@
|
||||||
package sql
|
package sql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"garm/config"
|
|
||||||
"garm/params"
|
|
||||||
"garm/runner/providers/common"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
"gorm.io/datatypes"
|
"gorm.io/datatypes"
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
garmTesting "garm/internal/testing"
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,13 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
dbCommon "garm/database/common"
|
|
||||||
garmTesting "garm/internal/testing"
|
|
||||||
"garm/params"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
||||||
"gorm.io/driver/mysql"
|
"gorm.io/driver/mysql"
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
garmTesting "garm/internal/testing"
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
"gopkg.in/DATA-DOG/go-sqlmock.v1"
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database/common"
|
"github.com/cloudbase/garm/database/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newDBConn returns a new gorm db connection, given the config
|
// newDBConn returns a new gorm db connection, given the config
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,10 @@ package sql
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
runnerErrors "garm/errors"
|
|
||||||
"garm/params"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
||||||
module garm
|
module github.com/cloudbase/garm
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,13 @@
|
||||||
package testing
|
package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"garm/config"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ package metrics
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner"
|
"github.com/cloudbase/garm/runner"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ package params
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"garm/config"
|
|
||||||
"garm/runner/providers/common"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/errors"
|
"github.com/cloudbase/garm/errors"
|
||||||
"garm/runner/providers/common"
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultRunnerPrefix = "garm"
|
const DefaultRunnerPrefix = "garm"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|
@ -19,6 +19,11 @@ func (_m *GithubClient) CreateOrganizationRegistrationToken(ctx context.Context,
|
||||||
ret := _m.Called(ctx, owner)
|
ret := _m.Called(ctx, owner)
|
||||||
|
|
||||||
var r0 *github.RegistrationToken
|
var r0 *github.RegistrationToken
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (*github.RegistrationToken, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) *github.RegistrationToken); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) *github.RegistrationToken); ok {
|
||||||
r0 = rf(ctx, owner)
|
r0 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -27,7 +32,6 @@ func (_m *GithubClient) CreateOrganizationRegistrationToken(ctx context.Context,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner)
|
r1 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -36,7 +40,6 @@ func (_m *GithubClient) CreateOrganizationRegistrationToken(ctx context.Context,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
||||||
r2 = rf(ctx, owner)
|
r2 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -51,6 +54,11 @@ func (_m *GithubClient) CreateRegistrationToken(ctx context.Context, owner strin
|
||||||
ret := _m.Called(ctx, owner, repo)
|
ret := _m.Called(ctx, owner, repo)
|
||||||
|
|
||||||
var r0 *github.RegistrationToken
|
var r0 *github.RegistrationToken
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*github.RegistrationToken, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, repo)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) *github.RegistrationToken); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) *github.RegistrationToken); ok {
|
||||||
r0 = rf(ctx, owner, repo)
|
r0 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -59,7 +67,6 @@ func (_m *GithubClient) CreateRegistrationToken(ctx context.Context, owner strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner, repo)
|
r1 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -68,7 +75,6 @@ func (_m *GithubClient) CreateRegistrationToken(ctx context.Context, owner strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok {
|
||||||
r2 = rf(ctx, owner, repo)
|
r2 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -83,6 +89,11 @@ func (_m *GithubClient) GetWorkflowJobByID(ctx context.Context, owner string, re
|
||||||
ret := _m.Called(ctx, owner, repo, jobID)
|
ret := _m.Called(ctx, owner, repo, jobID)
|
||||||
|
|
||||||
var r0 *github.WorkflowJob
|
var r0 *github.WorkflowJob
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (*github.WorkflowJob, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, repo, jobID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.WorkflowJob); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.WorkflowJob); ok {
|
||||||
r0 = rf(ctx, owner, repo, jobID)
|
r0 = rf(ctx, owner, repo, jobID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -91,7 +102,6 @@ func (_m *GithubClient) GetWorkflowJobByID(ctx context.Context, owner string, re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner, repo, jobID)
|
r1 = rf(ctx, owner, repo, jobID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -100,7 +110,6 @@ func (_m *GithubClient) GetWorkflowJobByID(ctx context.Context, owner string, re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, string, int64) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, string, int64) error); ok {
|
||||||
r2 = rf(ctx, owner, repo, jobID)
|
r2 = rf(ctx, owner, repo, jobID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -115,6 +124,11 @@ func (_m *GithubClient) ListOrganizationRunnerApplicationDownloads(ctx context.C
|
||||||
ret := _m.Called(ctx, owner)
|
ret := _m.Called(ctx, owner)
|
||||||
|
|
||||||
var r0 []*github.RunnerApplicationDownload
|
var r0 []*github.RunnerApplicationDownload
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*github.RunnerApplicationDownload, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []*github.RunnerApplicationDownload); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*github.RunnerApplicationDownload); ok {
|
||||||
r0 = rf(ctx, owner)
|
r0 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -123,7 +137,6 @@ func (_m *GithubClient) ListOrganizationRunnerApplicationDownloads(ctx context.C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner)
|
r1 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -132,7 +145,6 @@ func (_m *GithubClient) ListOrganizationRunnerApplicationDownloads(ctx context.C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
||||||
r2 = rf(ctx, owner)
|
r2 = rf(ctx, owner)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -147,6 +159,11 @@ func (_m *GithubClient) ListOrganizationRunners(ctx context.Context, owner strin
|
||||||
ret := _m.Called(ctx, owner, opts)
|
ret := _m.Called(ctx, owner, opts)
|
||||||
|
|
||||||
var r0 *github.Runners
|
var r0 *github.Runners
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) (*github.Runners, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, opts)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) *github.Runners); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) *github.Runners); ok {
|
||||||
r0 = rf(ctx, owner, opts)
|
r0 = rf(ctx, owner, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -155,7 +172,6 @@ func (_m *GithubClient) ListOrganizationRunners(ctx context.Context, owner strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListOptions) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListOptions) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner, opts)
|
r1 = rf(ctx, owner, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -164,7 +180,6 @@ func (_m *GithubClient) ListOrganizationRunners(ctx context.Context, owner strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListOptions) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListOptions) error); ok {
|
||||||
r2 = rf(ctx, owner, opts)
|
r2 = rf(ctx, owner, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -179,6 +194,11 @@ func (_m *GithubClient) ListRunnerApplicationDownloads(ctx context.Context, owne
|
||||||
ret := _m.Called(ctx, owner, repo)
|
ret := _m.Called(ctx, owner, repo)
|
||||||
|
|
||||||
var r0 []*github.RunnerApplicationDownload
|
var r0 []*github.RunnerApplicationDownload
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]*github.RunnerApplicationDownload, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, repo)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) []*github.RunnerApplicationDownload); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) []*github.RunnerApplicationDownload); ok {
|
||||||
r0 = rf(ctx, owner, repo)
|
r0 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -187,7 +207,6 @@ func (_m *GithubClient) ListRunnerApplicationDownloads(ctx context.Context, owne
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner, repo)
|
r1 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -196,7 +215,6 @@ func (_m *GithubClient) ListRunnerApplicationDownloads(ctx context.Context, owne
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok {
|
||||||
r2 = rf(ctx, owner, repo)
|
r2 = rf(ctx, owner, repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -211,6 +229,11 @@ func (_m *GithubClient) ListRunners(ctx context.Context, owner string, repo stri
|
||||||
ret := _m.Called(ctx, owner, repo, opts)
|
ret := _m.Called(ctx, owner, repo, opts)
|
||||||
|
|
||||||
var r0 *github.Runners
|
var r0 *github.Runners
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) (*github.Runners, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, repo, opts)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) *github.Runners); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) *github.Runners); ok {
|
||||||
r0 = rf(ctx, owner, repo, opts)
|
r0 = rf(ctx, owner, repo, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -219,7 +242,6 @@ func (_m *GithubClient) ListRunners(ctx context.Context, owner string, repo stri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, *github.ListOptions) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, *github.ListOptions) *github.Response); ok {
|
||||||
r1 = rf(ctx, owner, repo, opts)
|
r1 = rf(ctx, owner, repo, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -228,7 +250,6 @@ func (_m *GithubClient) ListRunners(ctx context.Context, owner string, repo stri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, string, *github.ListOptions) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, string, *github.ListOptions) error); ok {
|
||||||
r2 = rf(ctx, owner, repo, opts)
|
r2 = rf(ctx, owner, repo, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -243,6 +264,10 @@ func (_m *GithubClient) RemoveOrganizationRunner(ctx context.Context, owner stri
|
||||||
ret := _m.Called(ctx, owner, runnerID)
|
ret := _m.Called(ctx, owner, runnerID)
|
||||||
|
|
||||||
var r0 *github.Response
|
var r0 *github.Response
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64) (*github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, runnerID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok {
|
||||||
r0 = rf(ctx, owner, runnerID)
|
r0 = rf(ctx, owner, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -251,7 +276,6 @@ func (_m *GithubClient) RemoveOrganizationRunner(ctx context.Context, owner stri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||||
r1 = rf(ctx, owner, runnerID)
|
r1 = rf(ctx, owner, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -266,6 +290,10 @@ func (_m *GithubClient) RemoveRunner(ctx context.Context, owner string, repo str
|
||||||
ret := _m.Called(ctx, owner, repo, runnerID)
|
ret := _m.Called(ctx, owner, repo, runnerID)
|
||||||
|
|
||||||
var r0 *github.Response
|
var r0 *github.Response
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (*github.Response, error)); ok {
|
||||||
|
return rf(ctx, owner, repo, runnerID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.Response); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.Response); ok {
|
||||||
r0 = rf(ctx, owner, repo, runnerID)
|
r0 = rf(ctx, owner, repo, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -274,7 +302,6 @@ func (_m *GithubClient) RemoveRunner(ctx context.Context, owner string, repo str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok {
|
||||||
r1 = rf(ctx, owner, repo, runnerID)
|
r1 = rf(ctx, owner, repo, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|
@ -19,6 +19,11 @@ func (_m *GithubEnterpriseClient) CreateRegistrationToken(ctx context.Context, e
|
||||||
ret := _m.Called(ctx, enterprise)
|
ret := _m.Called(ctx, enterprise)
|
||||||
|
|
||||||
var r0 *github.RegistrationToken
|
var r0 *github.RegistrationToken
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (*github.RegistrationToken, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, enterprise)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) *github.RegistrationToken); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) *github.RegistrationToken); ok {
|
||||||
r0 = rf(ctx, enterprise)
|
r0 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -27,7 +32,6 @@ func (_m *GithubEnterpriseClient) CreateRegistrationToken(ctx context.Context, e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, enterprise)
|
r1 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -36,7 +40,6 @@ func (_m *GithubEnterpriseClient) CreateRegistrationToken(ctx context.Context, e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
||||||
r2 = rf(ctx, enterprise)
|
r2 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -51,6 +54,11 @@ func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Con
|
||||||
ret := _m.Called(ctx, enterprise)
|
ret := _m.Called(ctx, enterprise)
|
||||||
|
|
||||||
var r0 []*github.RunnerApplicationDownload
|
var r0 []*github.RunnerApplicationDownload
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*github.RunnerApplicationDownload, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, enterprise)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []*github.RunnerApplicationDownload); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*github.RunnerApplicationDownload); ok {
|
||||||
r0 = rf(ctx, enterprise)
|
r0 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -59,7 +67,6 @@ func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) *github.Response); ok {
|
||||||
r1 = rf(ctx, enterprise)
|
r1 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -68,7 +75,6 @@ func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
||||||
r2 = rf(ctx, enterprise)
|
r2 = rf(ctx, enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -83,6 +89,11 @@ func (_m *GithubEnterpriseClient) ListRunners(ctx context.Context, enterprise st
|
||||||
ret := _m.Called(ctx, enterprise, opts)
|
ret := _m.Called(ctx, enterprise, opts)
|
||||||
|
|
||||||
var r0 *github.Runners
|
var r0 *github.Runners
|
||||||
|
var r1 *github.Response
|
||||||
|
var r2 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) (*github.Runners, *github.Response, error)); ok {
|
||||||
|
return rf(ctx, enterprise, opts)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) *github.Runners); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOptions) *github.Runners); ok {
|
||||||
r0 = rf(ctx, enterprise, opts)
|
r0 = rf(ctx, enterprise, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -91,7 +102,6 @@ func (_m *GithubEnterpriseClient) ListRunners(ctx context.Context, enterprise st
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 *github.Response
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListOptions) *github.Response); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListOptions) *github.Response); ok {
|
||||||
r1 = rf(ctx, enterprise, opts)
|
r1 = rf(ctx, enterprise, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -100,7 +110,6 @@ func (_m *GithubEnterpriseClient) ListRunners(ctx context.Context, enterprise st
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2 error
|
|
||||||
if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListOptions) error); ok {
|
if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListOptions) error); ok {
|
||||||
r2 = rf(ctx, enterprise, opts)
|
r2 = rf(ctx, enterprise, opts)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -115,6 +124,10 @@ func (_m *GithubEnterpriseClient) RemoveRunner(ctx context.Context, enterprise s
|
||||||
ret := _m.Called(ctx, enterprise, runnerID)
|
ret := _m.Called(ctx, enterprise, runnerID)
|
||||||
|
|
||||||
var r0 *github.Response
|
var r0 *github.Response
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64) (*github.Response, error)); ok {
|
||||||
|
return rf(ctx, enterprise, runnerID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok {
|
||||||
r0 = rf(ctx, enterprise, runnerID)
|
r0 = rf(ctx, enterprise, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -123,7 +136,6 @@ func (_m *GithubEnterpriseClient) RemoveRunner(ctx context.Context, enterprise s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
|
||||||
r1 = rf(ctx, enterprise, runnerID)
|
r1 = rf(ctx, enterprise, runnerID)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
params "garm/params"
|
params "github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
mock "github.com/stretchr/testify/mock"
|
mock "github.com/stretchr/testify/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -32,13 +31,16 @@ func (_m *PoolManager) GithubRunnerRegistrationToken() (string, error) {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 string
|
var r0 string
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() string); ok {
|
if rf, ok := ret.Get(0).(func() string); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(string)
|
r0 = ret.Get(0).(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
params "garm/params"
|
|
||||||
|
|
||||||
|
params "github.com/cloudbase/garm/params"
|
||||||
mock "github.com/stretchr/testify/mock"
|
mock "github.com/stretchr/testify/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -33,13 +33,16 @@ func (_m *Provider) CreateInstance(ctx context.Context, bootstrapParams params.B
|
||||||
ret := _m.Called(ctx, bootstrapParams)
|
ret := _m.Called(ctx, bootstrapParams)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, params.BootstrapInstance) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, bootstrapParams)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, params.BootstrapInstance) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, params.BootstrapInstance) params.Instance); ok {
|
||||||
r0 = rf(ctx, bootstrapParams)
|
r0 = rf(ctx, bootstrapParams)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, params.BootstrapInstance) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, params.BootstrapInstance) error); ok {
|
||||||
r1 = rf(ctx, bootstrapParams)
|
r1 = rf(ctx, bootstrapParams)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -68,13 +71,16 @@ func (_m *Provider) GetInstance(ctx context.Context, instance string) (params.In
|
||||||
ret := _m.Called(ctx, instance)
|
ret := _m.Called(ctx, instance)
|
||||||
|
|
||||||
var r0 params.Instance
|
var r0 params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Instance, error)); ok {
|
||||||
|
return rf(ctx, instance)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
|
||||||
r0 = rf(ctx, instance)
|
r0 = rf(ctx, instance)
|
||||||
} else {
|
} else {
|
||||||
r0 = ret.Get(0).(params.Instance)
|
r0 = ret.Get(0).(params.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, instance)
|
r1 = rf(ctx, instance)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -89,6 +95,10 @@ func (_m *Provider) ListInstances(ctx context.Context, poolID string) ([]params.
|
||||||
ret := _m.Called(ctx, poolID)
|
ret := _m.Called(ctx, poolID)
|
||||||
|
|
||||||
var r0 []params.Instance
|
var r0 []params.Instance
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
|
||||||
|
return rf(ctx, poolID)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
|
||||||
r0 = rf(ctx, poolID)
|
r0 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -97,7 +107,6 @@ func (_m *Provider) ListInstances(ctx context.Context, poolID string) ([]params.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||||
r1 = rf(ctx, poolID)
|
r1 = rf(ctx, poolID)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,9 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"garm/params"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"garm/params"
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate mockery --all
|
//go:generate mockery --all
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,15 @@ package runner
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/auth"
|
|
||||||
"garm/config"
|
|
||||||
runnerErrors "garm/errors"
|
|
||||||
"garm/params"
|
|
||||||
"garm/runner/common"
|
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/auth"
|
||||||
|
"github.com/cloudbase/garm/config"
|
||||||
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/runner/common"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,16 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database"
|
"github.com/cloudbase/garm/database"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
garmTesting "garm/internal/testing"
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
runnerCommonMocks "garm/runner/common/mocks"
|
runnerCommonMocks "github.com/cloudbase/garm/runner/common/mocks"
|
||||||
runnerMocks "garm/runner/mocks"
|
runnerMocks "github.com/cloudbase/garm/runner/mocks"
|
||||||
|
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@ package runner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
dbCommon "garm/database/common"
|
|
||||||
"garm/params"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/params"
|
||||||
|
"github.com/cloudbase/garm/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RepoPoolManager interface {
|
type RepoPoolManager interface {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
common "garm/runner/common"
|
|
||||||
|
|
||||||
databasecommon "garm/database/common"
|
common "github.com/cloudbase/garm/runner/common"
|
||||||
|
|
||||||
|
databasecommon "github.com/cloudbase/garm/database/common"
|
||||||
|
|
||||||
mock "github.com/stretchr/testify/mock"
|
mock "github.com/stretchr/testify/mock"
|
||||||
|
|
||||||
params "garm/params"
|
params "github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PoolManagerController is an autogenerated mock type for the PoolManagerController type
|
// PoolManagerController is an autogenerated mock type for the PoolManagerController type
|
||||||
|
|
@ -23,6 +24,10 @@ func (_m *PoolManagerController) CreateEnterprisePoolManager(ctx context.Context
|
||||||
ret := _m.Called(ctx, enterprise, providers, store)
|
ret := _m.Called(ctx, enterprise, providers, store)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, params.Enterprise, map[string]common.Provider, databasecommon.Store) (common.PoolManager, error)); ok {
|
||||||
|
return rf(ctx, enterprise, providers, store)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, params.Enterprise, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, params.Enterprise, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
||||||
r0 = rf(ctx, enterprise, providers, store)
|
r0 = rf(ctx, enterprise, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -31,7 +36,6 @@ func (_m *PoolManagerController) CreateEnterprisePoolManager(ctx context.Context
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, params.Enterprise, map[string]common.Provider, databasecommon.Store) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, params.Enterprise, map[string]common.Provider, databasecommon.Store) error); ok {
|
||||||
r1 = rf(ctx, enterprise, providers, store)
|
r1 = rf(ctx, enterprise, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -46,6 +50,10 @@ func (_m *PoolManagerController) CreateOrgPoolManager(ctx context.Context, org p
|
||||||
ret := _m.Called(ctx, org, providers, store)
|
ret := _m.Called(ctx, org, providers, store)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, params.Organization, map[string]common.Provider, databasecommon.Store) (common.PoolManager, error)); ok {
|
||||||
|
return rf(ctx, org, providers, store)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, params.Organization, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, params.Organization, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
||||||
r0 = rf(ctx, org, providers, store)
|
r0 = rf(ctx, org, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -54,7 +62,6 @@ func (_m *PoolManagerController) CreateOrgPoolManager(ctx context.Context, org p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, params.Organization, map[string]common.Provider, databasecommon.Store) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, params.Organization, map[string]common.Provider, databasecommon.Store) error); ok {
|
||||||
r1 = rf(ctx, org, providers, store)
|
r1 = rf(ctx, org, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -69,6 +76,10 @@ func (_m *PoolManagerController) CreateRepoPoolManager(ctx context.Context, repo
|
||||||
ret := _m.Called(ctx, repo, providers, store)
|
ret := _m.Called(ctx, repo, providers, store)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, params.Repository, map[string]common.Provider, databasecommon.Store) (common.PoolManager, error)); ok {
|
||||||
|
return rf(ctx, repo, providers, store)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, params.Repository, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, params.Repository, map[string]common.Provider, databasecommon.Store) common.PoolManager); ok {
|
||||||
r0 = rf(ctx, repo, providers, store)
|
r0 = rf(ctx, repo, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -77,7 +88,6 @@ func (_m *PoolManagerController) CreateRepoPoolManager(ctx context.Context, repo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, params.Repository, map[string]common.Provider, databasecommon.Store) error); ok {
|
if rf, ok := ret.Get(1).(func(context.Context, params.Repository, map[string]common.Provider, databasecommon.Store) error); ok {
|
||||||
r1 = rf(ctx, repo, providers, store)
|
r1 = rf(ctx, repo, providers, store)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -134,6 +144,10 @@ func (_m *PoolManagerController) GetEnterprisePoolManager(enterprise params.Ente
|
||||||
ret := _m.Called(enterprise)
|
ret := _m.Called(enterprise)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(params.Enterprise) (common.PoolManager, error)); ok {
|
||||||
|
return rf(enterprise)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(params.Enterprise) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(params.Enterprise) common.PoolManager); ok {
|
||||||
r0 = rf(enterprise)
|
r0 = rf(enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -142,7 +156,6 @@ func (_m *PoolManagerController) GetEnterprisePoolManager(enterprise params.Ente
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(params.Enterprise) error); ok {
|
if rf, ok := ret.Get(1).(func(params.Enterprise) error); ok {
|
||||||
r1 = rf(enterprise)
|
r1 = rf(enterprise)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -157,6 +170,10 @@ func (_m *PoolManagerController) GetEnterprisePoolManagers() (map[string]common.
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 map[string]common.PoolManager
|
var r0 map[string]common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (map[string]common.PoolManager, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -165,7 +182,6 @@ func (_m *PoolManagerController) GetEnterprisePoolManagers() (map[string]common.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -180,6 +196,10 @@ func (_m *PoolManagerController) GetOrgPoolManager(org params.Organization) (com
|
||||||
ret := _m.Called(org)
|
ret := _m.Called(org)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(params.Organization) (common.PoolManager, error)); ok {
|
||||||
|
return rf(org)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(params.Organization) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(params.Organization) common.PoolManager); ok {
|
||||||
r0 = rf(org)
|
r0 = rf(org)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -188,7 +208,6 @@ func (_m *PoolManagerController) GetOrgPoolManager(org params.Organization) (com
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(params.Organization) error); ok {
|
if rf, ok := ret.Get(1).(func(params.Organization) error); ok {
|
||||||
r1 = rf(org)
|
r1 = rf(org)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -203,6 +222,10 @@ func (_m *PoolManagerController) GetOrgPoolManagers() (map[string]common.PoolMan
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 map[string]common.PoolManager
|
var r0 map[string]common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (map[string]common.PoolManager, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -211,7 +234,6 @@ func (_m *PoolManagerController) GetOrgPoolManagers() (map[string]common.PoolMan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -226,6 +248,10 @@ func (_m *PoolManagerController) GetRepoPoolManager(repo params.Repository) (com
|
||||||
ret := _m.Called(repo)
|
ret := _m.Called(repo)
|
||||||
|
|
||||||
var r0 common.PoolManager
|
var r0 common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(params.Repository) (common.PoolManager, error)); ok {
|
||||||
|
return rf(repo)
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func(params.Repository) common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func(params.Repository) common.PoolManager); ok {
|
||||||
r0 = rf(repo)
|
r0 = rf(repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -234,7 +260,6 @@ func (_m *PoolManagerController) GetRepoPoolManager(repo params.Repository) (com
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func(params.Repository) error); ok {
|
if rf, ok := ret.Get(1).(func(params.Repository) error); ok {
|
||||||
r1 = rf(repo)
|
r1 = rf(repo)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -249,6 +274,10 @@ func (_m *PoolManagerController) GetRepoPoolManagers() (map[string]common.PoolMa
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|
||||||
var r0 map[string]common.PoolManager
|
var r0 map[string]common.PoolManager
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func() (map[string]common.PoolManager, error)); ok {
|
||||||
|
return rf()
|
||||||
|
}
|
||||||
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
if rf, ok := ret.Get(0).(func() map[string]common.PoolManager); ok {
|
||||||
r0 = rf()
|
r0 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -257,7 +286,6 @@ func (_m *PoolManagerController) GetRepoPoolManagers() (map[string]common.PoolMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(1).(func() error); ok {
|
if rf, ok := ret.Get(1).(func() error); ok {
|
||||||
r1 = rf()
|
r1 = rf()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,11 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,16 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database"
|
"github.com/cloudbase/garm/database"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
garmTesting "garm/internal/testing"
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
runnerCommonMocks "garm/runner/common/mocks"
|
runnerCommonMocks "github.com/cloudbase/garm/runner/common/mocks"
|
||||||
runnerMocks "garm/runner/mocks"
|
runnerMocks "github.com/cloudbase/garm/runner/mocks"
|
||||||
|
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
package pool
|
package pool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,13 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
providerCommon "garm/runner/providers/common"
|
providerCommon "github.com/cloudbase/garm/runner/providers/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
12
runner/providers/external/external.go
vendored
12
runner/providers/external/external.go
vendored
|
|
@ -6,12 +6,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
garmErrors "garm/errors"
|
garmErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
providerCommon "garm/runner/providers/common"
|
providerCommon "github.com/cloudbase/garm/runner/providers/common"
|
||||||
"garm/util/exec"
|
"github.com/cloudbase/garm/util/exec"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
3
runner/providers/external/util.go
vendored
3
runner/providers/external/util.go
vendored
|
|
@ -2,8 +2,9 @@ package external
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"garm/params"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cloudbase/garm/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
|
|
||||||
lxd "github.com/lxc/lxd/client"
|
lxd "github.com/lxc/lxd/client"
|
||||||
"github.com/lxc/lxd/shared/api"
|
"github.com/lxc/lxd/shared/api"
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
lxd "github.com/lxc/lxd/client"
|
lxd "github.com/lxc/lxd/client"
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/providers/common"
|
"github.com/cloudbase/garm/runner/providers/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/juju/clock"
|
"github.com/juju/clock"
|
||||||
"github.com/juju/retry"
|
"github.com/juju/retry"
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/runner/providers/external"
|
"github.com/cloudbase/garm/runner/providers/external"
|
||||||
"garm/runner/providers/lxd"
|
"github.com/cloudbase/garm/runner/providers/lxd"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,11 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,16 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database"
|
"github.com/cloudbase/garm/database"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
garmTesting "garm/internal/testing"
|
garmTesting "github.com/cloudbase/garm/internal/testing"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
runnerCommonMocks "garm/runner/common/mocks"
|
runnerCommonMocks "github.com/cloudbase/garm/runner/common/mocks"
|
||||||
runnerMocks "garm/runner/mocks"
|
runnerMocks "github.com/cloudbase/garm/runner/mocks"
|
||||||
|
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
|
||||||
|
|
@ -29,17 +29,17 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"garm/auth"
|
"github.com/cloudbase/garm/auth"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
"garm/database"
|
"github.com/cloudbase/garm/database"
|
||||||
dbCommon "garm/database/common"
|
dbCommon "github.com/cloudbase/garm/database/common"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
"garm/runner/pool"
|
"github.com/cloudbase/garm/runner/pool"
|
||||||
"garm/runner/providers"
|
"github.com/cloudbase/garm/runner/providers"
|
||||||
providerCommon "garm/runner/providers/common"
|
providerCommon "github.com/cloudbase/garm/runner/providers/common"
|
||||||
"garm/util"
|
"github.com/cloudbase/garm/util"
|
||||||
|
|
||||||
"github.com/juju/clock"
|
"github.com/juju/clock"
|
||||||
"github.com/juju/retry"
|
"github.com/juju/retry"
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package runner
|
package runner
|
||||||
|
|
||||||
import "garm/config"
|
import "github.com/cloudbase/garm/config"
|
||||||
|
|
||||||
type HookTargetType string
|
type HookTargetType string
|
||||||
|
|
||||||
|
|
|
||||||
10
util/util.go
10
util/util.go
|
|
@ -32,11 +32,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"garm/cloudconfig"
|
"github.com/cloudbase/garm/cloudconfig"
|
||||||
"garm/config"
|
"github.com/cloudbase/garm/config"
|
||||||
runnerErrors "garm/errors"
|
runnerErrors "github.com/cloudbase/garm/errors"
|
||||||
"garm/params"
|
"github.com/cloudbase/garm/params"
|
||||||
"garm/runner/common"
|
"github.com/cloudbase/garm/runner/common"
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue