Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/server/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ func (t MockTool) GetAuthTokenHeaderName(tools.SourceProvider) (string, error) {
return "Authorization", nil
}

func (t MockTool) GetScopesRequired() []string {
return nil
}

// MockPrompt is used to mock prompts in tests
type MockPrompt struct {
Name string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type Config struct {
Description string `yaml:"description"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -206,3 +208,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type Config struct {
Description string `yaml:"description"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -211,3 +213,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type Config struct {
Description string `yaml:"description"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -216,3 +218,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -187,3 +189,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -191,3 +193,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
6 changes: 6 additions & 0 deletions internal/tools/alloydb/alloydbgetuser/alloydbgetuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -191,3 +193,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -181,3 +183,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -186,3 +188,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
6 changes: 6 additions & 0 deletions internal/tools/alloydb/alloydblistusers/alloydblistusers.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
BaseURL string `yaml:"baseURL"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -186,3 +188,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ type Config struct {
Multiplier float64 `yaml:"multiplier"`
MaxRetries int `yaml:"maxRetries"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -306,3 +308,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
6 changes: 6 additions & 0 deletions internal/tools/alloydbainl/alloydbainl.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ type Config struct {
AuthRequired []string `yaml:"authRequired"`
NLConfigParameters parameters.Parameters `yaml:"nlConfigParameters"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -179,3 +181,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -353,3 +355,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -468,3 +470,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -324,3 +326,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -314,3 +316,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -197,3 +199,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -207,3 +209,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -203,3 +205,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ type Config struct {
Description string `yaml:"description" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -213,3 +215,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ type Config struct {
Description string `yaml:"description"`
AuthRequired []string `yaml:"authRequired"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -291,3 +293,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.Parameters
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
6 changes: 6 additions & 0 deletions internal/tools/bigquery/bigquerysql/bigquerysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ type Config struct {
Parameters parameters.Parameters `yaml:"parameters"`
TemplateParameters parameters.Parameters `yaml:"templateParameters"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -286,3 +288,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
6 changes: 6 additions & 0 deletions internal/tools/bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ type Config struct {
Parameters parameters.Parameters `yaml:"parameters"`
TemplateParameters parameters.Parameters `yaml:"templateParameters"`
Annotations *tools.ToolAnnotations `yaml:"annotations,omitempty"`

ScopesRequired []string `yaml:"scopesRequired"`
}

// validate interface
Expand Down Expand Up @@ -151,3 +153,7 @@ func (t Tool) GetAuthTokenHeaderName(resourceMgr tools.SourceProvider) (string,
func (t Tool) GetParameters() parameters.Parameters {
return t.AllParams
}

func (t Tool) GetScopesRequired() []string {
return t.ScopesRequired
}
Loading
Loading