client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultURL = "https://api.hirefire.io/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Id             string `json:"id"`
	OrganizationId string `json:"organization_id"`
}

type AccountResource

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

func (*AccountResource) Create

func (r *AccountResource) Create(create Account) (*Account, error)

func (*AccountResource) Delete

func (r *AccountResource) Delete(id string) error

func (*AccountResource) Get

func (r *AccountResource) Get(id string) (*Account, error)

func (*AccountResource) Update

func (r *AccountResource) Update(update Account) (*Account, error)

type Application

type Application struct {
	Id                         string  `json:"id"`
	AccountId                  string  `json:"account_id"`
	Name                       string  `json:"name"`
	Token                      string  `json:"token"`
	CheckupFrequency           int     `json:"checkup_frequency"`
	CustomDomain               *string `json:"custom_domain"`
	LogplexDrainToken          *string `json:"logplex_drain_token"`
	Ssl                        bool    `json:"ssl"`
	RestartCrashedDynos        bool    `json:"restart_crashed_dynos"`
	NewIssueNotifications      bool    `json:"new_issue_notifications"`
	ResolvedIssueNotifications bool    `json:"resolved_issue_notifications"`
}

type ApplicationResource

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

func (*ApplicationResource) Create

func (r *ApplicationResource) Create(create Application) (*Application, error)

func (*ApplicationResource) Delete

func (r *ApplicationResource) Delete(id string) error

func (*ApplicationResource) Get

func (*ApplicationResource) Update

func (r *ApplicationResource) Update(update Application) (*Application, error)

type Client

type Client struct {
	URL string

	Organization *OrganizationResource
	Account      *AccountResource
	Application  *ApplicationResource
	Manager      *ManagerResource
	TimeRange    *TimeRangeResource
	Recipient    *RecipientResource
	User         *UserResource
	Membership   *MembershipResource
	// contains filtered or unexported fields
}

func New

func New(apiKey string) *Client

type Manager

type Manager struct {
	Id            string `json:"id"`
	ApplicationId string `json:"application_id"`
	Name          string `json:"name"`
	Type          string `json:"type"`
	Enabled       bool   `json:"enabled"`
	Minimum       int    `json:"minimum"`
	Maximum       int    `json:"maximum"`

	Aggregation          *string `json:"aggregation"`
	Percentile           *int    `json:"percentile"`
	MinimumLatency       *int    `json:"minimum_latency"`
	MaximumLatency       *int    `json:"maximum_latency"`
	MinimumQueueTime     *int    `json:"minimum_queue_time"`
	MaximumQueueTime     *int    `json:"maximum_queue_time"`
	MinimumResponseTime  *int    `json:"minimum_response_time"`
	MaximumResponseTime  *int    `json:"maximum_response_time"`
	MinimumConnectTime   *int    `json:"minimum_connect_time"`
	MaximumConnectTime   *int    `json:"maximum_connect_time"`
	MinimumLoad          *int    `json:"minimum_load"`
	MaximumLoad          *int    `json:"maximum_load"`
	MinimumApdex         *int    `json:"minimum_apdex"`
	MaximumApdex         *int    `json:"maximum_apdex"`
	LastMinutes          *int    `json:"last_minutes"`
	Ratio                *int    `json:"ratio"`
	Decrementable        *bool   `json:"decrementable"`
	Url                  *string `json:"url"`
	UpscaleQuantity      *int    `json:"upscale_quantity"`
	DownscaleQuantity    *int    `json:"downscale_quantity"`
	UpscaleSensitivity   *int    `json:"upscale_sensitivity"`
	DownscaleSensitivity *int    `json:"downscale_sensitivity"`
	UpscaleTimeout       int     `json:"upscale_timeout"`
	DownscaleTimeout     int     `json:"downscale_timeout"`
	UpscaleLimit         int     `json:"upscale_limit"`
	DownscaleLimit       int     `json:"downscale_limit"`
	UpscaleOnInitialJob  *bool   `json:"upscale_on_initial_job"`
	ScaleUpOn503         *bool   `json:"scale_up_on_503"`
	NewRelicApiKey       *string `json:"new_relic_api_key"`
	NewRelicAccountId    *string `json:"new_relic_account_id"`
	NewRelicAppId        *string `json:"new_relic_app_id"`
	Notify               bool    `json:"notify"`
	NotifyQuantity       int     `json:"notify_quantity"`
	NotifyAfter          int     `json:"notify_after"`
}

type ManagerResource

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

func (*ManagerResource) Create

func (r *ManagerResource) Create(create Manager) (*Manager, error)

func (*ManagerResource) Delete

func (r *ManagerResource) Delete(id string) error

func (*ManagerResource) Get

func (r *ManagerResource) Get(id string) (*Manager, error)

func (*ManagerResource) Update

func (r *ManagerResource) Update(update Manager) (*Manager, error)

type Membership added in v0.2.0

type Membership struct {
	Id             string `json:"id"`
	OrganizationId string `json:"organization_id"`
	UserId         string `json:"user_id"`
	Owner          bool   `json:"owner"`
}

type MembershipResource added in v0.2.0

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

func (*MembershipResource) Create added in v0.2.0

func (r *MembershipResource) Create(create Membership) (*Membership, error)

func (*MembershipResource) Delete added in v0.2.0

func (r *MembershipResource) Delete(id string) error

func (*MembershipResource) Get added in v0.2.0

func (r *MembershipResource) Get(id string) (*Membership, error)

func (*MembershipResource) Update added in v0.2.0

func (r *MembershipResource) Update(update Membership) (*Membership, error)

type Organization

type Organization struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	TimeZone string `json:"time_zone"`
}

type OrganizationResource

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

func (*OrganizationResource) Create

func (r *OrganizationResource) Create(create Organization) (*Organization, error)

func (*OrganizationResource) Delete

func (r *OrganizationResource) Delete(id string) error

func (*OrganizationResource) Get

func (*OrganizationResource) Update

func (r *OrganizationResource) Update(update Organization) (*Organization, error)

type Recipient added in v0.2.0

type Recipient struct {
	Id            string `json:"id"`
	ApplicationId string `json:"application_id"`
	Email         string `json:"email"`
}

type RecipientResource added in v0.2.0

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

func (*RecipientResource) Create added in v0.2.0

func (r *RecipientResource) Create(create Recipient) (*Recipient, error)

func (*RecipientResource) Delete added in v0.2.0

func (r *RecipientResource) Delete(id string) error

func (*RecipientResource) Get added in v0.2.0

func (r *RecipientResource) Get(id string) (*Recipient, error)

func (*RecipientResource) Update added in v0.2.0

func (r *RecipientResource) Update(update Recipient) (*Recipient, error)

type TimeRange added in v0.2.0

type TimeRange struct {
	Id          string `json:"id"`
	ManagerId   string `json:"manager_id"`
	FromMinute  int    `json:"from_minute"`
	UntilMinute int    `json:"until_minute"`
	Minimum     int    `json:"minimum"`
	Maximum     int    `json:"maximum"`
	Position    int    `json:"position"`
	Monday      bool   `json:"monday"`
	Tuesday     bool   `json:"tuesday"`
	Wednesday   bool   `json:"wednesday"`
	Thursday    bool   `json:"thursday"`
	Friday      bool   `json:"friday"`
	Saturday    bool   `json:"saturday"`
	Sunday      bool   `json:"sunday"`
}

type TimeRangeResource added in v0.2.0

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

func (*TimeRangeResource) Create added in v0.2.0

func (r *TimeRangeResource) Create(create TimeRange) (*TimeRange, error)

func (*TimeRangeResource) Delete added in v0.2.0

func (r *TimeRangeResource) Delete(id string) error

func (*TimeRangeResource) Get added in v0.2.0

func (r *TimeRangeResource) Get(id string) (*TimeRange, error)

func (*TimeRangeResource) Update added in v0.2.0

func (r *TimeRangeResource) Update(update TimeRange) (*TimeRange, error)

type User added in v0.2.0

type User struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	Notifications bool   `json:"notifications"`
}

type UserResource added in v0.2.0

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

func (*UserResource) Get added in v0.2.0

func (r *UserResource) Get(id string) (*User, error)

Jump to

Keyboard shortcuts

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