Skip to content

Commit

Permalink
regenerate to add Project.Mode field
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 15, 2020
1 parent 4009f12 commit 145adab
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import (
"time"
)

// ErrInvalidScheme is returned when HTTP is used, which results in a silent failure
// due to Cloud Run's redirection of HTTP -> HTTPs.
var ErrInvalidScheme = errors.New("Client.URL must be HTTPS, not HTTP")

// Alert represents configuration for performing alerting.
type Alert struct {
// CreatedAt is a timestamp indicating when the alert was created. This field is read-only.
Expand Down Expand Up @@ -158,7 +154,7 @@ type Notification struct {
WebhookURL string `json:"webhook_url"`
}

// Project represents a customer application.
// Project represents an isolated set of log events and alerts. A project can be created for each application, environment, or team within an organization depending on your preferences.
type Project struct {
// CreatedAt is a timestamp indicating when the project was created. This field is read-only.
CreatedAt time.Time `json:"created_at"`
Expand All @@ -172,6 +168,9 @@ type Project struct {
// Location is the geographical location where the log events are stored. This field is required. Must be one of: "us-west2", "northamerica-northeast1", "us-east4", "southamerica-east1", "europe-north1", "europe-west2", "europe-west6", "asia-east2", "asia-south1", "asia-northeast2", "asia-east1", "asia-northeast1", "asia-southeast1", "australia-southeast1".
Location string `json:"location"`

// Mode is the storage mode, optimized for plain-text or structured logs. Both options support plain-text and structured logging, however, the structured mode shards on the `message` value, restricting its length to 1024 bytes. This field is required. Must be one of: "plain_text", "structured".
Mode string `json:"mode"`

// Name is the human-friendly project name. This field is required.
Name string `json:"name"`

Expand Down Expand Up @@ -707,16 +706,6 @@ type UpdateSearchInput struct {
Search Search `json:"search"`
}

// oneOf returns true if s is in the values.
func oneOf(s string, values []string) bool {
for _, v := range values {
if s == v {
return true
}
}
return false
}

// Client is the API client.
type Client struct {
// URL is the required API endpoint address.
Expand Down Expand Up @@ -916,6 +905,9 @@ func (c *Client) UpdateSearch(in UpdateSearchInput) error {
return call(c.HTTPClient, c.AuthToken, c.URL, "update_search", in, nil)
}

// ErrInvalidScheme is returned when HTTP is used instead of HTTPS.
var ErrInvalidScheme = errors.New("Client.URL must be HTTPS, not HTTP")

// Error is an error returned by the client.
type Error struct {
Status string
Expand Down

0 comments on commit 145adab

Please sign in to comment.