runscope

package
v0.10.0-tubi Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEndpoint = "https://api.runscope.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Key        string
	Name       string
	Team       Team
	AuthToken  string
	Default    bool
	VerifySSL  bool
	TriggerURL string
}

func BucketFromSchema

func BucketFromSchema(s *schema.Bucket) *Bucket

type BucketClient

type BucketClient struct {
	// contains filtered or unexported fields
}

func (*BucketClient) Create

func (c *BucketClient) Create(ctx context.Context, opts *BucketCreateOpts) (*Bucket, error)

func (*BucketClient) Delete

func (c *BucketClient) Delete(ctx context.Context, opts *BucketDeleteOpts) error

func (*BucketClient) Get

func (c *BucketClient) Get(ctx context.Context, opts *BucketGetOpts) (*Bucket, error)

func (*BucketClient) List

func (c *BucketClient) List(ctx context.Context) ([]*Bucket, error)

type BucketCreateOpts

type BucketCreateOpts struct {
	Name     string
	TeamUUID string
}

func (*BucketCreateOpts) URL

func (opts *BucketCreateOpts) URL() string

type BucketDeleteOpts

type BucketDeleteOpts struct {
	BucketGetOpts
}

type BucketGetOpts

type BucketGetOpts struct {
	Key string
}

func (*BucketGetOpts) URL

func (opts *BucketGetOpts) URL() string

type Client

type Client struct {
	Test        TestClient
	Environment EnvironmentClient
	Bucket      BucketClient
	Integration IntegrationClient
	Schedule    ScheduleClient
	Step        StepClient
	RemoteAgent RemoteAgentClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...ClientOption) *Client

func (*Client) Do

func (c *Client) Do(r *http.Request, v interface{}) error

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, path string, body interface{}) (*http.Request, error)

type ClientOption

type ClientOption func(*Client)

func WithEndpoint

func WithEndpoint(endpoint string) ClientOption

func WithToken

func WithToken(token string) ClientOption

type CreatedBy

type CreatedBy struct {
	Id    string
	Name  string
	Email string
}

type Emails

type Emails struct {
	NotifyAll       bool
	NotifyOn        string
	NotifyThreshold int
	Recipients      []Recipient
}

func (Emails) IsDefault

func (e Emails) IsDefault() bool

type Environment

type Environment struct {
	EnvironmentBase
	Id string
}

func EnvironmentFromSchema

func EnvironmentFromSchema(s *schema.Environment) *Environment

type EnvironmentBase

type EnvironmentBase struct {
	Name                string
	Script              string
	PreserveCookies     bool
	InitialVariables    map[string]string
	Integrations        []string
	Regions             []string
	RemoteAgents        []EnvironmentRemoteAgent
	RetryOnFailure      bool
	StopOnFailure       bool
	VerifySSL           bool
	Webhooks            []string
	Emails              Emails
	ParentEnvironmentId string
	ClientCertificate   string
}

type EnvironmentClient

type EnvironmentClient struct {
	// contains filtered or unexported fields
}

func (*EnvironmentClient) Create

func (*EnvironmentClient) Delete

func (*EnvironmentClient) Get

func (*EnvironmentClient) Update

type EnvironmentCreateOpts

type EnvironmentCreateOpts struct {
	EnvironmentUriOpts
	EnvironmentBase
}

type EnvironmentDeleteOpts

type EnvironmentDeleteOpts struct {
	EnvironmentGetOpts
}

type EnvironmentGetOpts

type EnvironmentGetOpts struct {
	EnvironmentUriOpts
	Id string
}

func (*EnvironmentGetOpts) URL

func (opts *EnvironmentGetOpts) URL() string

type EnvironmentRemoteAgent

type EnvironmentRemoteAgent struct {
	Name string
	UUID string
}

type EnvironmentUpdateOpts

type EnvironmentUpdateOpts struct {
	EnvironmentGetOpts
	EnvironmentBase
}

type EnvironmentUriOpts

type EnvironmentUriOpts struct {
	BucketId string
	TestId   string
}

func (*EnvironmentUriOpts) BaseURL

func (opts *EnvironmentUriOpts) BaseURL() string

type Error

type Error struct {
	Response *http.Response
	E        struct {
		Status  int    `json:"status"`
		Message string `json:"message"`
	} `json:"error"`
}

func (Error) Error

func (e Error) Error() string

func (Error) Status

func (e Error) Status() int

type Integration

type Integration struct {
	UUID        string
	Type        string
	Description string
}

func IntegrationFromSchema

func IntegrationFromSchema(s schema.Integration) *Integration

type IntegrationClient

type IntegrationClient struct {
	// contains filtered or unexported fields
}

func (*IntegrationClient) List

type IntegrationListOpts

type IntegrationListOpts struct {
	TeamId string
}

func (*IntegrationListOpts) URL

func (opts *IntegrationListOpts) URL() string

type Recipient

type Recipient struct {
	Id    string
	Name  string
	Email string
}

type RemoteAgent

type RemoteAgent struct {
	Id      string
	Name    string
	Version string
}

func RemoteAgentFromSchema

func RemoteAgentFromSchema(s schema.RemoteAgent) *RemoteAgent

type RemoteAgentClient

type RemoteAgentClient struct {
	// contains filtered or unexported fields
}

func (*RemoteAgentClient) List

List returns a list of the team’s currently connected agents.

See https://api.blazemeter.com/api-monitoring/#team-agents-list

type RemoteAgentListOpts

type RemoteAgentListOpts struct {
	TeamUUID string
}

func (*RemoteAgentListOpts) URL

func (opts *RemoteAgentListOpts) URL() string

URL returns an URL of agents list request

See https://api.blazemeter.com/api-monitoring/#team-agents-list

type Schedule

type Schedule struct {
	ScheduleBase
	Id         string
	ExportedAt time.Time
}

func ScheduleFromSchema

func ScheduleFromSchema(s *schema.Schedule) *Schedule

type ScheduleBase

type ScheduleBase struct {
	EnvironmentId string
	Interval      string
	Note          string
}

type ScheduleClient

type ScheduleClient struct {
	// contains filtered or unexported fields
}

func (*ScheduleClient) Create

func (c *ScheduleClient) Create(ctx context.Context, opts *ScheduleCreateOpts) (*Schedule, error)

func (*ScheduleClient) Delete

func (c *ScheduleClient) Delete(ctx context.Context, opts *ScheduleDeleteOpts) error

func (*ScheduleClient) Get

func (*ScheduleClient) Update

func (c *ScheduleClient) Update(ctx context.Context, opts *ScheduleUpdateOpts) (*Schedule, error)

type ScheduleCreateOpts

type ScheduleCreateOpts struct {
	ScheduleURLOpts
	ScheduleBase
}

type ScheduleDeleteOpts

type ScheduleDeleteOpts struct {
	ScheduleGetOpts
}

type ScheduleGetOpts

type ScheduleGetOpts struct {
	ScheduleURLOpts
	Id string
}

func (*ScheduleGetOpts) URL

func (opts *ScheduleGetOpts) URL() string

type ScheduleURLOpts

type ScheduleURLOpts struct {
	BucketId string
	TestId   string
}

func (*ScheduleURLOpts) URL

func (opts *ScheduleURLOpts) URL() string

type ScheduleUpdateOpts

type ScheduleUpdateOpts struct {
	ScheduleGetOpts
	ScheduleBase
}

type Step

type Step struct {
	StepBase
	Id string
}

func StepFromSchema

func StepFromSchema(s *schema.Step) *Step

type StepAssertion

type StepAssertion struct {
	Source     string
	Property   string
	Comparison string
	Value      string
}

type StepAuth

type StepAuth struct {
	Username string
	Password string
	AuthType string
}

func (StepAuth) Empty

func (s StepAuth) Empty() bool

type StepBase

type StepBase struct {
	StepType      string
	Method        string
	StepURL       string
	Variables     []StepVariable
	Assertions    []StepAssertion
	Headers       map[string][]string
	Auth          StepAuth
	Body          string
	Form          map[string][]string
	Scripts       []string
	BeforeScripts []string
	Note          string
	Skipped       bool
}

type StepBaseOpts

type StepBaseOpts struct {
	StepType      string
	Method        string
	StepURL       string
	Variables     []StepVariable
	Assertions    []StepAssertion
	Headers       map[string][]string
	Auth          StepAuth
	Body          string
	Form          map[string][]string
	Scripts       []string
	BeforeScripts []string
	Note          string
	Skipped       bool
}

type StepClient

type StepClient struct {
	// contains filtered or unexported fields
}

func (*StepClient) Create

func (c *StepClient) Create(ctx context.Context, opts *StepCreateOpts) (*Step, error)

func (*StepClient) Delete

func (c *StepClient) Delete(ctx context.Context, opts *StepDeleteOpts) error

func (*StepClient) Get

func (c *StepClient) Get(ctx context.Context, opts *StepGetOpts) (*Step, error)

func (*StepClient) Update

func (c *StepClient) Update(ctx context.Context, opts *StepUpdateOpts) (*Step, error)

type StepCreateOpts

type StepCreateOpts struct {
	StepUriOpts
	StepBaseOpts
}

type StepDeleteOpts

type StepDeleteOpts struct {
	StepGetOpts
}

type StepGetOpts

type StepGetOpts struct {
	StepUriOpts
	Id string
}

func (*StepGetOpts) URL

func (opts *StepGetOpts) URL() string

type StepUpdateOpts

type StepUpdateOpts struct {
	StepGetOpts
	StepBaseOpts
}

type StepUriOpts

type StepUriOpts struct {
	BucketId string
	TestId   string
}

func (StepUriOpts) URL

func (s StepUriOpts) URL() string

type StepVariable

type StepVariable struct {
	Name     string
	Property string
	Source   string
}

type Team

type Team struct {
	Name string
	UUID string
}

type Test

type Test struct {
	TestMinimal
	Id                   string
	DefaultEnvironmentId string
	Steps                []TestStep
	CreatedAt            time.Time
	CreatedBy            CreatedBy
	LastRun              time.Time
	TriggerURL           string
}

func TestFromSchema

func TestFromSchema(s schema.Test) *Test

type TestClient

type TestClient struct {
	// contains filtered or unexported fields
}

func (*TestClient) Create

func (c *TestClient) Create(ctx context.Context, opts TestCreateOpts) (*Test, error)

func (*TestClient) Delete

func (c *TestClient) Delete(ctx context.Context, opts TestDeleteOpts) error

func (*TestClient) Get

func (c *TestClient) Get(ctx context.Context, opts TestGetOpts) (*Test, error)

func (*TestClient) Update

func (c *TestClient) Update(ctx context.Context, opts TestUpdateOpts) (*Test, error)

type TestCreateOpts

type TestCreateOpts struct {
	TestMinimal
	BucketId string
}

type TestDeleteOpts

type TestDeleteOpts struct {
	BucketId string
	Id       string
}

type TestGetOpts

type TestGetOpts struct {
	BucketId string
	Id       string
}

type TestMinimal

type TestMinimal struct {
	Name        string
	Description string
}

type TestStep

type TestStep struct {
	Id string
}

type TestUpdateOpts

type TestUpdateOpts struct {
	Test
	BucketId string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL