├── img └── example_output.png ├── .gitignore ├── go.mod ├── .gcloudignore ├── invoice ├── cost.go └── invoice.go ├── gbilling.go ├── report ├── summary_report.go ├── detail_report.go └── report_test.go ├── README.md ├── notice └── notice.go ├── LICENSE ├── go.sum └── CREDITS /img/example_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/future-architect/gbilling2slack/HEAD/img/example_output.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | ### Goland ### 15 | .idea 16 | 17 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/future-architect/gbilling2slack 2 | 3 | go 1.12 4 | 5 | require ( 6 | cloud.google.com/go v0.43.0 7 | github.com/dustin/go-humanize v1.0.0 8 | github.com/gorilla/websocket v1.4.0 // indirect 9 | github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 // indirect 10 | github.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018 // indirect 11 | github.com/nlopes/slack v0.5.0 12 | github.com/pkg/errors v0.8.1 // indirect 13 | github.com/stretchr/testify v1.3.0 // indirect 14 | google.golang.org/api v0.7.0 15 | ) 16 | -------------------------------------------------------------------------------- /.gcloudignore: -------------------------------------------------------------------------------- 1 | # This file specifies files that are *not* uploaded to Google Cloud Platform 2 | # using gcloud. It follows the same syntax as .gitignore, with the addition of 3 | # "#!include" directives (which insert the entries of the given .gitignore-style 4 | # file at that point). 5 | # 6 | # For more information, run: 7 | # $ gcloud topic gcloudignore 8 | # 9 | .gcloudignore 10 | # If you would like to upload your .git directory, .gitignore file or files 11 | # from your .gitignore file, remove the corresponding line 12 | # below: 13 | .git 14 | .gitignore 15 | 16 | node_modules 17 | -------------------------------------------------------------------------------- /invoice/cost.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package invoice 17 | 18 | type Cost struct { 19 | ProjectID string `bigquery:"project"` 20 | ServiceName string `bigquery:"service"` 21 | Cost float64 `bigquery:"cost"` 22 | } 23 | 24 | type CostList []Cost 25 | 26 | func (l CostList) CalcTotalCost() int64 { 27 | var totalCost float64 28 | for _, sc := range l { 29 | totalCost += sc.Cost 30 | } 31 | return int64(totalCost) 32 | } 33 | 34 | func (l CostList) GroupBy() map[string]CostList { 35 | result := make(map[string]CostList) 36 | for _, sc := range l { 37 | result[sc.ProjectID] = append(result[sc.ProjectID], sc) 38 | } 39 | return result 40 | } 41 | 42 | func (l CostList) GetCost(projectID, serviceName string) int64 { 43 | for _, cost := range l { 44 | if cost.ProjectID == projectID && cost.ServiceName == serviceName { 45 | return int64(cost.Cost) 46 | } 47 | } 48 | return 0 49 | } 50 | -------------------------------------------------------------------------------- /gbilling.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package gbilling2slack 17 | 18 | import ( 19 | "cloud.google.com/go/pubsub" 20 | "context" 21 | "fmt" 22 | "github.com/future-architect/gbilling2slack/invoice" 23 | "github.com/future-architect/gbilling2slack/notice" 24 | "github.com/future-architect/gbilling2slack/report" 25 | "log" 26 | "os" 27 | ) 28 | 29 | func NotifyBilling(ctx context.Context, msg *pubsub.Message) error { 30 | 31 | var ( 32 | projectID = os.Getenv("GCP_PROJECT") 33 | tableName = os.Getenv("TABLE_NAME") 34 | slackAPIToken = os.Getenv("SLACK_API_TOKEN") 35 | slackChannel = os.Getenv("SLACK_CHANNEL") 36 | ) 37 | 38 | if projectID == "" || tableName == "" || slackAPIToken == "" || slackChannel == "" { 39 | return fmt.Errorf("missing env") 40 | } 41 | 42 | inv := invoice.NewInvoice(projectID, tableName) 43 | 44 | monthBilling, err := inv.FetchBillingMonth(ctx) 45 | if err != nil { 46 | log.Println(err) 47 | return err 48 | } 49 | 50 | dayBilling, err := inv.FetchBillingDay(ctx) 51 | if err != nil { 52 | log.Println(err) 53 | return err 54 | } 55 | 56 | notifier := notice.NewSlackNotifier(slackAPIToken, slackChannel) 57 | 58 | // send summary report 59 | summaryReport := report.NewSummaryReport(monthBilling, dayBilling) 60 | parentTS, err := notifier.PostBilling(summaryReport) 61 | if err != nil { 62 | log.Println(err) 63 | return err 64 | } 65 | 66 | // send detail report 67 | detailReportList := report.NewDetailReportList(monthBilling, dayBilling) 68 | for _, detailReport := range detailReportList { 69 | if detailReport.MonthlyTotalCost == 0 { 70 | continue 71 | } 72 | if err := notifier.PostBillingThread(parentTS, detailReport); err != nil { 73 | log.Println(err) 74 | return err 75 | } 76 | } 77 | 78 | return nil 79 | } 80 | -------------------------------------------------------------------------------- /report/summary_report.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package report 17 | 18 | import ( 19 | "github.com/future-architect/gbilling2slack/invoice" 20 | "sort" 21 | "strings" 22 | ) 23 | 24 | type ProjectCost struct { 25 | ProjectID string 26 | MonthlyCost int64 27 | DailyCost int64 28 | } 29 | 30 | // SummaryReport is represent billing summary message. For example is below. 31 | // 32 | // < 06/01 - 06/22 > Invoice YYYY/MM ( MM/DD 00:00-24:00 ) 33 | // dev-pj | 0 円 ( 0 → ) 34 | // stg-pj | 15,044 円 ( 347 ↑ ) 35 | // rcv-pj | 5,551 円 ( 114 ↑ ) 36 | // ――――――――――――――――――――――――――――― 37 | // Sum | 20,596 円 ( 462 ↑ ) 38 | type SummaryReport struct { 39 | ProjectCostList []ProjectCost 40 | MonthlyTotalCost int64 41 | DailyTotalCost int64 42 | } 43 | 44 | func NewSummaryReport(monthBilling, dayBilling invoice.CostList) *SummaryReport { 45 | monthCosts := monthBilling.GroupBy() 46 | dailyCosts := dayBilling.GroupBy() 47 | 48 | var pcList []ProjectCost 49 | for projectID, costList := range monthCosts { 50 | pcList = append(pcList, ProjectCost{ 51 | ProjectID: projectID, 52 | MonthlyCost: costList.CalcTotalCost(), 53 | DailyCost: dailyCosts[projectID].CalcTotalCost(), 54 | }) 55 | } 56 | 57 | // sort by A-Z 58 | sort.Slice(pcList, func(i, j int) bool { 59 | return strings.ToLower(pcList[i].ProjectID) < strings.ToLower(pcList[j].ProjectID) 60 | }) 61 | 62 | return &SummaryReport{ 63 | ProjectCostList: pcList, 64 | MonthlyTotalCost: monthBilling.CalcTotalCost(), 65 | DailyTotalCost: dayBilling.CalcTotalCost(), 66 | } 67 | } 68 | 69 | func (r SummaryReport) GetMaxKeyLength(initVal int) int { 70 | length := initVal 71 | for _, pc := range r.ProjectCostList { 72 | if length < len(pc.ProjectID) { 73 | length = len(pc.ProjectID) 74 | } 75 | } 76 | return length 77 | } 78 | -------------------------------------------------------------------------------- /invoice/invoice.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package invoice 17 | 18 | import ( 19 | "cloud.google.com/go/bigquery" 20 | "context" 21 | "google.golang.org/api/iterator" 22 | "time" 23 | ) 24 | 25 | type invoice struct { 26 | projectID string 27 | tableName string 28 | } 29 | 30 | func NewInvoice(projectID, tableName string) *invoice { 31 | return &invoice{ 32 | projectID: projectID, 33 | tableName: tableName, 34 | } 35 | } 36 | 37 | func (i *invoice) FetchBillingDay(ctx context.Context) (CostList, error) { 38 | stmt := ` 39 | SELECT 40 | project.id as project, 41 | service.description as service, 42 | IFNULL(sum(cost), 0) as cost 43 | FROM 44 | ` + "`" + i.tableName + "`" + ` 45 | WHERE 46 | DATE(_PARTITIONTIME) = ` + time.Now().Format("'2006-01-02'") + ` 47 | AND 48 | project.id IS NOT NULL 49 | GROUP BY 50 | project, 51 | service 52 | ORDER BY 53 | project` 54 | 55 | return i.fetchBilling(ctx, stmt) 56 | } 57 | 58 | func (i *invoice) FetchBillingMonth(ctx context.Context) (CostList, error) { 59 | 60 | stmt := ` 61 | SELECT 62 | project.id as project, 63 | service.description as service, 64 | IFNULL(sum(cost), 0) as cost 65 | FROM 66 | ` + "`" + i.tableName + "`" + ` 67 | WHERE 68 | invoice.month = ` + time.Now().Format("'200601'") + ` 69 | AND 70 | project.id IS NOT NULL 71 | GROUP BY 72 | project, 73 | service 74 | ORDER BY 75 | project` 76 | 77 | return i.fetchBilling(ctx, stmt) 78 | } 79 | 80 | func (i *invoice) fetchBilling(ctx context.Context, stmt string) (CostList, error) { 81 | 82 | client, err := bigquery.NewClient(ctx, i.projectID) 83 | if err != nil { 84 | return nil, err 85 | } 86 | 87 | iter, err := client.Query(stmt).Read(ctx) 88 | if err != nil { 89 | return nil, err 90 | } 91 | 92 | billing := make([]Cost, 0) 93 | for { 94 | var sc Cost 95 | err := iter.Next(&sc) 96 | if err == iterator.Done { 97 | break 98 | } 99 | if err != nil { 100 | return nil, err 101 | } 102 | billing = append(billing, sc) 103 | } 104 | 105 | return billing, nil 106 | } 107 | -------------------------------------------------------------------------------- /report/detail_report.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package report 17 | 18 | import ( 19 | "github.com/future-architect/gbilling2slack/invoice" 20 | "sort" 21 | "strings" 22 | ) 23 | 24 | type ServiceCost struct { 25 | ServiceName string 26 | MonthlyServiceCost int64 27 | DailyServiceCost int64 28 | } 29 | 30 | // DetailReport represent is detail cost per projectID. For example is below. 31 | // 32 | // < 06/01 - 06/22 > YOUR-PROJECT-ID 33 | // service name | month cost ( day cost ) 34 | // ------------------------------------------------------ 35 | // Cloud Scheduler | 1 円 ( 0 → ) 36 | // Compute Engine | 15,042 円 ( 347 ↑ ) 37 | type DetailReport struct { 38 | ProjectID string 39 | ServiceCostList []ServiceCost 40 | MonthlyTotalCost int64 41 | DailyTotalCost int64 42 | } 43 | 44 | func NewDetailReportList(monthBilling, dayBilling invoice.CostList) []*DetailReport { 45 | monthCosts := monthBilling.GroupBy() 46 | dayCosts := dayBilling.GroupBy() 47 | 48 | var result []*DetailReport 49 | for projectID, costList := range monthCosts { 50 | 51 | var scList []ServiceCost 52 | for _, cost := range costList { 53 | scList = append(scList, ServiceCost{ 54 | ServiceName: cost.ServiceName, 55 | MonthlyServiceCost: int64(cost.Cost), 56 | DailyServiceCost: dayCosts[projectID].GetCost(projectID, cost.ServiceName), 57 | }) 58 | } 59 | 60 | // sort by A-Z 61 | sort.Slice(scList, func(i, j int) bool { 62 | return strings.ToLower(scList[i].ServiceName) < strings.ToLower(scList[j].ServiceName) 63 | }) 64 | 65 | result = append(result, &DetailReport{ 66 | ProjectID: projectID, 67 | ServiceCostList: scList, 68 | MonthlyTotalCost: costList.CalcTotalCost(), 69 | DailyTotalCost: dayCosts[projectID].CalcTotalCost(), 70 | }) 71 | } 72 | 73 | // sort by A-Z 74 | sort.Slice(result, func(i, j int) bool { 75 | return strings.ToLower(result[i].ProjectID) < strings.ToLower(result[j].ProjectID) 76 | }) 77 | 78 | return result 79 | } 80 | 81 | func (r DetailReport) GetMaxKeyLength(initVal int) int { 82 | if initVal < len(r.ProjectID) { 83 | return len(r.ProjectID) 84 | } 85 | return initVal 86 | } 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gbilling2slack 2 | Slack notifications tools for Google Cloud Platform Billing. 3 | 4 | 5 | 6 | ## Overview 7 | 8 | This package notifies gcp billing to your slack channel. 9 | 10 | * Cloud Scheduler sends message to Cloud Pub/Sub and Cloud Pub/Sub triggers Cloud Functions. 11 | * Cloud Functions gets billing from BigQuery table and sends it to your Slack channel. 12 | * You can see billing on Slack channel. 13 | 14 | ## Requirements 15 | 16 | *Notify GCP Billing to Slack* requires the following to run: 17 | 18 | * [Go](https://golang.org/dl/) more than 1.11 19 | * [Cloud SDK](https://cloud.google.com/sdk/install/) 20 | 21 | ## Variables 22 | 23 | *Notify GCP Billing to Slack* requires only 3 variables to run: 24 | 25 | |# |variables |Note | 26 | |---|----------------|---------------------------------| 27 | | 1 |TABLE_NAME |Table name of billing on BigQuery| 28 | | 2 |SLACK_API_TOKEN |Slack api token | 29 | | 3 |SLACK_CHANNEL |Slack channel name | 30 | 31 | 32 | ## Usage 33 | 34 | This package uses below services. 35 | 36 | - Google Cloud Billing(BigQuery) 37 | - Google Cloud Functions 38 | - Google Cloud Pub/Sub 39 | - Google Cloud Scheduler 40 | - Slack API 41 | 42 | 43 | ## Steps 44 | 45 | 1. [Get Slack API Token](https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens) 46 | 2. Export your GCP billing to BigQuery ([reference](https://cloud.google.com/billing/docs/how-to/export-data-bigquery)) 47 | 3. Set Cloud Scheduler 48 | ```sh 49 | gcloud beta scheduler jobs create pubsub notify-billing-to-slack --project \ 50 | --schedule "55 23 * * *" \ 51 | --topic topic-billing \ 52 | --message-body="execute" \ 53 | --time-zone "Asia/Tokyo" \ 54 | --description "This job invokes cloud function via cloud pubsub and send GCP billing to slack" 55 | ``` 56 | 4. Deploy to Cloud Functions 57 | ```sh 58 | gcloud functions deploy notifyBilling --project \ 59 | --entry-point NotifyBilling \ 60 | --trigger-resource topic-billing \ 61 | --trigger-event google.pubsub.topic.publish \ 62 | --runtime go111 \ 63 | --set-env-vars TABLE_NAME= \ 64 | --set-env-vars SLACK_API_TOKEN= \ 65 | --set-env-vars SLACK_CHANNEL= 66 | ``` 67 | 5. Go to the [Cloud Scheduler page](https://cloud.google.com/scheduler/docs/tut-pub-sub) and click the *run now* button of *notify-billing-to-slack* 68 | 69 | 70 | ## Example 71 | 72 | You can get below output on slack when it comes to the set time. 73 | 74 | This automatically notify you of charges for all services charged on GCP. 75 | 76 | 77 | ![example.png](img/example_output.png) 78 | 79 | 80 | ## License 81 | 82 | This project is licensed under the Apache License 2.0 License - see the [LICENSE](LICENSE) file for details 83 | -------------------------------------------------------------------------------- /notice/notice.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package notice 17 | 18 | import ( 19 | "fmt" 20 | "github.com/dustin/go-humanize" 21 | "github.com/future-architect/gbilling2slack/report" 22 | "github.com/nlopes/slack" 23 | "time" 24 | ) 25 | 26 | type slackNotifier struct { 27 | slackAPIToken string 28 | slackChannel string 29 | } 30 | 31 | func NewSlackNotifier(slackAPIToken, slackChannel string) *slackNotifier { 32 | return &slackNotifier{ 33 | slackAPIToken: slackAPIToken, 34 | slackChannel: slackChannel, 35 | } 36 | } 37 | 38 | func getArrow(cost int64) string { 39 | if cost > 0 { 40 | return "↑" 41 | } 42 | return "→" 43 | } 44 | 45 | func getDate() (int, int, int, string) { 46 | year, month, day := time.Now().Date() 47 | period := fmt.Sprintf("< %v/01 - %v/%v > ", int(month), int(month), day) 48 | return year, int(month), day, period 49 | } 50 | 51 | func createHead() string { 52 | year, month, day, period := getDate() 53 | 54 | text := period 55 | text += fmt.Sprintf(" Invoice %v/%v ", year, month) 56 | text += fmt.Sprintf("( %v/%v 00:00-24:00 )\n", month, day) 57 | return text 58 | } 59 | 60 | func insertHeaderPerProject(projectID string, pad int) string { 61 | _, _, _, period := getDate() 62 | 63 | text := period 64 | text += fmt.Sprintf("%v\n", projectID) 65 | text += fmt.Sprintf("%*v | %13v %7v\n", pad, "service name", "month cost", "( day cost )") 66 | text += fmt.Sprintf("------------------------------------------------------\n") 67 | return text 68 | } 69 | 70 | // Return post message's timestamp to post in the thread 71 | func (n *slackNotifier) postInline(text string) (string, error) { 72 | _, ts, err := slack.New(n.slackAPIToken).PostMessage( 73 | n.slackChannel, 74 | slack.MsgOptionText("```"+text+"```", false), 75 | ) 76 | return ts, err 77 | } 78 | 79 | // ts is parent message's timestamp to post in the thread 80 | func (n *slackNotifier) postThreadInline(text, ts string) error { 81 | _, _, err := slack.New(n.slackAPIToken).PostMessage( 82 | n.slackChannel, 83 | slack.MsgOptionText("```"+text+"```", false), 84 | slack.MsgOptionTS(ts), 85 | ) 86 | return err 87 | } 88 | 89 | func (n *slackNotifier) PostBilling(summaryReport *report.SummaryReport) (string, error) { 90 | 91 | // padding degree 92 | padDegree := summaryReport.GetMaxKeyLength(25) * (-1) 93 | 94 | text := createHead() 95 | 96 | // this loop create cost list per project 97 | for _, cost := range summaryReport.ProjectCostList { 98 | projectID := cost.ProjectID 99 | text += fmt.Sprintf("%*v | %10v 円 ( %5v %v )\n", 100 | padDegree, 101 | projectID, humanize.Comma(cost.MonthlyCost), 102 | humanize.Comma(cost.DailyCost), 103 | getArrow(cost.DailyCost)) 104 | } 105 | 106 | text += fmt.Sprintf("―――――――――――――――――――――――――――――――――――――――――――――――――――――\n") 107 | text += fmt.Sprintf("%*v | %10v 円 ( %5v %v )\n", 108 | padDegree, 109 | "Sum", 110 | humanize.Comma(summaryReport.MonthlyTotalCost), 111 | humanize.Comma(summaryReport.DailyTotalCost), 112 | getArrow(summaryReport.DailyTotalCost)) 113 | 114 | // get parent message's timestamp to create thead 115 | return n.postInline(text) 116 | } 117 | 118 | func (n *slackNotifier) PostBillingThread(parentTS string, detailReport *report.DetailReport) error { 119 | padDegree := detailReport.GetMaxKeyLength(25) * (-1) 120 | 121 | text := insertHeaderPerProject(detailReport.ProjectID, padDegree) 122 | 123 | for _, c := range detailReport.ServiceCostList { 124 | if c.MonthlyServiceCost == 0 { 125 | continue 126 | } 127 | 128 | text += fmt.Sprintf("%*v | %10v 円 ( %5v %v )\n", 129 | padDegree, 130 | c.ServiceName, 131 | humanize.Comma(c.MonthlyServiceCost), 132 | humanize.Comma(c.DailyServiceCost), 133 | getArrow(c.DailyServiceCost)) 134 | } 135 | return n.postThreadInline(text, parentTS) 136 | } 137 | -------------------------------------------------------------------------------- /report/report_test.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present Future Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package report 17 | 18 | import ( 19 | "encoding/json" 20 | "fmt" 21 | "github.com/future-architect/gbilling2slack/invoice" 22 | "testing" 23 | ) 24 | 25 | var monthlyInput = `[ 26 | {"ProjectID": "dev-pj", "ServiceName": "Compute Engine", "Cost": 14995.11}, 27 | {"ProjectID": "dev-pj", "ServiceName": "App Engine", "Cost": 3.14}, 28 | {"ProjectID": "stg-dx", "ServiceName": "Compute Engine", "Cost": 0.1}, 29 | {"ProjectID": "btn-pj", "ServiceName": "Cloud Scheduler", "Cost": 10.1}, 30 | {"ProjectID": "btn-pj", "ServiceName": "Cloud SQL", "Cost": 741.9}, 31 | {"ProjectID": "btn-pj", "ServiceName": "Compute Engine", "Cost": 4780.1} 32 | ]` 33 | 34 | var dailyInput = `[ 35 | {"ProjectID": "dev-pj", "ServiceName": "Compute Engine", "Cost": 298.1}, 36 | {"ProjectID": "dev-pj", "ServiceName": "App Engine", "Cost": 0.2}, 37 | {"ProjectID": "stg-dx", "ServiceName": "Compute Engine", "Cost": 0.01}, 38 | {"ProjectID": "btn-pj", "ServiceName": "Cloud Scheduler", "Cost": 2.1}, 39 | {"ProjectID": "btn-pj", "ServiceName": "Cloud SQL", "Cost": 0.4}, 40 | {"ProjectID": "btn-pj", "ServiceName": "Compute Engine", "Cost": 96.12} 41 | ]` 42 | 43 | func TestSummary(t *testing.T) { 44 | 45 | var monthCosts []invoice.Cost 46 | if err := json.Unmarshal([]byte(monthlyInput), &monthCosts); err != nil { 47 | t.Fatal("test data parse is failed", err) 48 | } 49 | 50 | var dayCosts []invoice.Cost 51 | if err := json.Unmarshal([]byte(dailyInput), &dayCosts); err != nil { 52 | t.Fatal("test data parse is failed", err) 53 | } 54 | 55 | report := NewSummaryReport(monthCosts, dayCosts) 56 | 57 | if report.MonthlyTotalCost != 20530 { 58 | t.Error("monthlyTotalCost is expected 20531", report.MonthlyTotalCost) 59 | } 60 | 61 | if report.DailyTotalCost != 396 { 62 | t.Error("dailyTotalCost is expected 397", report.DailyTotalCost) 63 | } 64 | 65 | // sort check 66 | if report.ProjectCostList[0].ProjectID != "btn-pj" && 67 | report.ProjectCostList[1].ProjectID != "dev-dx" && 68 | report.ProjectCostList[2].ProjectID != "stg-dx" { 69 | t.Error("sort error", report.ProjectCostList[0], report.ProjectCostList[1], report.ProjectCostList[2]) 70 | } 71 | 72 | fmt.Printf("%+v", report) 73 | } 74 | 75 | func TestDetail(t *testing.T) { 76 | 77 | var monthCosts []invoice.Cost 78 | if err := json.Unmarshal([]byte(monthlyInput), &monthCosts); err != nil { 79 | t.Fatal("test data parse is failed", err) 80 | } 81 | 82 | var dayCosts []invoice.Cost 83 | if err := json.Unmarshal([]byte(dailyInput), &dayCosts); err != nil { 84 | t.Fatal("test data parse is failed", err) 85 | } 86 | 87 | report := NewDetailReportList(monthCosts, dayCosts) 88 | 89 | if len(report) != 3 { 90 | t.Fatal("report size is invalid", len(report)) 91 | } 92 | 93 | // check sort 94 | if report[0].ProjectID != "btn-pj" && 95 | report[1].ProjectID != "stg-dx" && 96 | report[2].ProjectID != "dev-pj" { 97 | t.Error("sort error", report[0].ProjectID) 98 | } 99 | 100 | // check detail sort check 101 | if report[0].ServiceCostList[0].ServiceName != "Cloud Scheduler" && 102 | report[0].ServiceCostList[1].ServiceName != "Cloud SQL" && 103 | report[0].ServiceCostList[2].ServiceName != "Compute Engine" { 104 | t.Error("sort detail list error", report[0].ProjectID) 105 | } 106 | 107 | // check monthly cost 108 | if report[0].MonthlyTotalCost != 5532 { 109 | t.Error("MonthlyTotalCost is expected 5532", report[0].MonthlyTotalCost) 110 | } 111 | 112 | // check daily cost 113 | if report[0].DailyTotalCost != 98 { 114 | t.Error("DailyTotalCost is expected 5532", report[0].DailyTotalCost) 115 | } 116 | 117 | // check service cost 118 | if report[0].ServiceCostList[0].ServiceName != "Cloud Scheduler" { 119 | t.Error("service name is illegal", report[0].ServiceCostList[0].ServiceName) 120 | } 121 | if report[0].ServiceCostList[0].MonthlyServiceCost != 10 { 122 | t.Error("scheduler monthly cost is invalid", report[0].ServiceCostList[0].MonthlyServiceCost) 123 | } 124 | if report[0].ServiceCostList[0].ServiceName != "Cloud Scheduler" { 125 | t.Error("service name is illegal", report[0].ServiceCostList[0].ServiceName) 126 | } 127 | 128 | fmt.Printf("%+v", report[0]) 129 | } 130 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2019-present Future Corporation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.43.0 h1:banaiRPAM8kUVYneOSkhgcDsLzEvL25FinuiSZaH/2w= 5 | cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= 6 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 7 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 8 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 9 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 10 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 11 | github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= 12 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 13 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= 14 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 15 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 16 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 17 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 18 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 19 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 20 | github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= 21 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 22 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 23 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 24 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 25 | github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= 26 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 27 | github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= 28 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 29 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 30 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 31 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 32 | github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= 33 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 34 | github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= 35 | github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 36 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 37 | github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= 38 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 39 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 40 | github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 h1:AsEBgzv3DhuYHI/GiQh2HxvTP71HCCE9E/tzGUzGdtU= 41 | github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5/go.mod h1:c2mYKRyMb1BPkO5St0c/ps62L4S0W2NAkaTXj9qEI+0= 42 | github.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018 h1:MNApn+Z+fIT4NPZopPfCc1obT6aY3SVM6DOctz1A9ZU= 43 | github.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018/go.mod h1:sFlOUpQL1YcjhFVXhg1CG8ZASEs/Mf1oVb6H75JL/zg= 44 | github.com/nlopes/slack v0.5.0 h1:NbIae8Kd0NpqaEI3iUrsuS0KbcEDhzhc939jLW5fNm0= 45 | github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= 46 | github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= 47 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 48 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 49 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 50 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 51 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 52 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 53 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 54 | go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= 55 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 56 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 57 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 58 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 59 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 60 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 61 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 62 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 63 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 64 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 65 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 66 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 67 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 68 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 69 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 70 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 71 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 72 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 73 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 74 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 75 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 76 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= 77 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 78 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 79 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 80 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= 81 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 82 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 83 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 84 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 85 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 86 | golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= 87 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 88 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 89 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 90 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 91 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 92 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 93 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 94 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 95 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= 96 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 97 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 98 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 99 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 100 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 101 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 102 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 103 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 104 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 105 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 106 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 107 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 108 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 109 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 110 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 111 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 112 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 113 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 114 | google.golang.org/api v0.7.0 h1:9sdfJOzWlkqPltHAuzT2Cp+yrBeY1KRVYgms8soxMwM= 115 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 116 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 117 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 118 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 119 | google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= 120 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 121 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 122 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 123 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 124 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 125 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 126 | google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= 127 | google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 128 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 129 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 130 | google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= 131 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 132 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 133 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 134 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 135 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 136 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | Go (the standard library) 2 | https://golang.org/ 3 | ---------------------------------------------------------------- 4 | Copyright (c) 2009 The Go Authors. All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following disclaimer 14 | in the documentation and/or other materials provided with the 15 | distribution. 16 | * Neither the name of Google Inc. nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | ================================================================ 33 | 34 | cloud.google.com/go 35 | https://cloud.google.com/go 36 | ---------------------------------------------------------------- 37 | 38 | Apache License 39 | Version 2.0, January 2004 40 | http://www.apache.org/licenses/ 41 | 42 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 43 | 44 | 1. Definitions. 45 | 46 | "License" shall mean the terms and conditions for use, reproduction, 47 | and distribution as defined by Sections 1 through 9 of this document. 48 | 49 | "Licensor" shall mean the copyright owner or entity authorized by 50 | the copyright owner that is granting the License. 51 | 52 | "Legal Entity" shall mean the union of the acting entity and all 53 | other entities that control, are controlled by, or are under common 54 | control with that entity. For the purposes of this definition, 55 | "control" means (i) the power, direct or indirect, to cause the 56 | direction or management of such entity, whether by contract or 57 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 58 | outstanding shares, or (iii) beneficial ownership of such entity. 59 | 60 | "You" (or "Your") shall mean an individual or Legal Entity 61 | exercising permissions granted by this License. 62 | 63 | "Source" form shall mean the preferred form for making modifications, 64 | including but not limited to software source code, documentation 65 | source, and configuration files. 66 | 67 | "Object" form shall mean any form resulting from mechanical 68 | transformation or translation of a Source form, including but 69 | not limited to compiled object code, generated documentation, 70 | and conversions to other media types. 71 | 72 | "Work" shall mean the work of authorship, whether in Source or 73 | Object form, made available under the License, as indicated by a 74 | copyright notice that is included in or attached to the work 75 | (an example is provided in the Appendix below). 76 | 77 | "Derivative Works" shall mean any work, whether in Source or Object 78 | form, that is based on (or derived from) the Work and for which the 79 | editorial revisions, annotations, elaborations, or other modifications 80 | represent, as a whole, an original work of authorship. For the purposes 81 | of this License, Derivative Works shall not include works that remain 82 | separable from, or merely link (or bind by name) to the interfaces of, 83 | the Work and Derivative Works thereof. 84 | 85 | "Contribution" shall mean any work of authorship, including 86 | the original version of the Work and any modifications or additions 87 | to that Work or Derivative Works thereof, that is intentionally 88 | submitted to Licensor for inclusion in the Work by the copyright owner 89 | or by an individual or Legal Entity authorized to submit on behalf of 90 | the copyright owner. For the purposes of this definition, "submitted" 91 | means any form of electronic, verbal, or written communication sent 92 | to the Licensor or its representatives, including but not limited to 93 | communication on electronic mailing lists, source code control systems, 94 | and issue tracking systems that are managed by, or on behalf of, the 95 | Licensor for the purpose of discussing and improving the Work, but 96 | excluding communication that is conspicuously marked or otherwise 97 | designated in writing by the copyright owner as "Not a Contribution." 98 | 99 | "Contributor" shall mean Licensor and any individual or Legal Entity 100 | on behalf of whom a Contribution has been received by Licensor and 101 | subsequently incorporated within the Work. 102 | 103 | 2. Grant of Copyright License. Subject to the terms and conditions of 104 | this License, each Contributor hereby grants to You a perpetual, 105 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 106 | copyright license to reproduce, prepare Derivative Works of, 107 | publicly display, publicly perform, sublicense, and distribute the 108 | Work and such Derivative Works in Source or Object form. 109 | 110 | 3. Grant of Patent License. Subject to the terms and conditions of 111 | this License, each Contributor hereby grants to You a perpetual, 112 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 113 | (except as stated in this section) patent license to make, have made, 114 | use, offer to sell, sell, import, and otherwise transfer the Work, 115 | where such license applies only to those patent claims licensable 116 | by such Contributor that are necessarily infringed by their 117 | Contribution(s) alone or by combination of their Contribution(s) 118 | with the Work to which such Contribution(s) was submitted. If You 119 | institute patent litigation against any entity (including a 120 | cross-claim or counterclaim in a lawsuit) alleging that the Work 121 | or a Contribution incorporated within the Work constitutes direct 122 | or contributory patent infringement, then any patent licenses 123 | granted to You under this License for that Work shall terminate 124 | as of the date such litigation is filed. 125 | 126 | 4. Redistribution. You may reproduce and distribute copies of the 127 | Work or Derivative Works thereof in any medium, with or without 128 | modifications, and in Source or Object form, provided that You 129 | meet the following conditions: 130 | 131 | (a) You must give any other recipients of the Work or 132 | Derivative Works a copy of this License; and 133 | 134 | (b) You must cause any modified files to carry prominent notices 135 | stating that You changed the files; and 136 | 137 | (c) You must retain, in the Source form of any Derivative Works 138 | that You distribute, all copyright, patent, trademark, and 139 | attribution notices from the Source form of the Work, 140 | excluding those notices that do not pertain to any part of 141 | the Derivative Works; and 142 | 143 | (d) If the Work includes a "NOTICE" text file as part of its 144 | distribution, then any Derivative Works that You distribute must 145 | include a readable copy of the attribution notices contained 146 | within such NOTICE file, excluding those notices that do not 147 | pertain to any part of the Derivative Works, in at least one 148 | of the following places: within a NOTICE text file distributed 149 | as part of the Derivative Works; within the Source form or 150 | documentation, if provided along with the Derivative Works; or, 151 | within a display generated by the Derivative Works, if and 152 | wherever such third-party notices normally appear. The contents 153 | of the NOTICE file are for informational purposes only and 154 | do not modify the License. You may add Your own attribution 155 | notices within Derivative Works that You distribute, alongside 156 | or as an addendum to the NOTICE text from the Work, provided 157 | that such additional attribution notices cannot be construed 158 | as modifying the License. 159 | 160 | You may add Your own copyright statement to Your modifications and 161 | may provide additional or different license terms and conditions 162 | for use, reproduction, or distribution of Your modifications, or 163 | for any such Derivative Works as a whole, provided Your use, 164 | reproduction, and distribution of the Work otherwise complies with 165 | the conditions stated in this License. 166 | 167 | 5. Submission of Contributions. Unless You explicitly state otherwise, 168 | any Contribution intentionally submitted for inclusion in the Work 169 | by You to the Licensor shall be under the terms and conditions of 170 | this License, without any additional terms or conditions. 171 | Notwithstanding the above, nothing herein shall supersede or modify 172 | the terms of any separate license agreement you may have executed 173 | with Licensor regarding such Contributions. 174 | 175 | 6. Trademarks. This License does not grant permission to use the trade 176 | names, trademarks, service marks, or product names of the Licensor, 177 | except as required for reasonable and customary use in describing the 178 | origin of the Work and reproducing the content of the NOTICE file. 179 | 180 | 7. Disclaimer of Warranty. Unless required by applicable law or 181 | agreed to in writing, Licensor provides the Work (and each 182 | Contributor provides its Contributions) on an "AS IS" BASIS, 183 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 184 | implied, including, without limitation, any warranties or conditions 185 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 186 | PARTICULAR PURPOSE. You are solely responsible for determining the 187 | appropriateness of using or redistributing the Work and assume any 188 | risks associated with Your exercise of permissions under this License. 189 | 190 | 8. Limitation of Liability. In no event and under no legal theory, 191 | whether in tort (including negligence), contract, or otherwise, 192 | unless required by applicable law (such as deliberate and grossly 193 | negligent acts) or agreed to in writing, shall any Contributor be 194 | liable to You for damages, including any direct, indirect, special, 195 | incidental, or consequential damages of any character arising as a 196 | result of this License or out of the use or inability to use the 197 | Work (including but not limited to damages for loss of goodwill, 198 | work stoppage, computer failure or malfunction, or any and all 199 | other commercial damages or losses), even if such Contributor 200 | has been advised of the possibility of such damages. 201 | 202 | 9. Accepting Warranty or Additional Liability. While redistributing 203 | the Work or Derivative Works thereof, You may choose to offer, 204 | and charge a fee for, acceptance of support, warranty, indemnity, 205 | or other liability obligations and/or rights consistent with this 206 | License. However, in accepting such obligations, You may act only 207 | on Your own behalf and on Your sole responsibility, not on behalf 208 | of any other Contributor, and only if You agree to indemnify, 209 | defend, and hold each Contributor harmless for any liability 210 | incurred by, or claims asserted against, such Contributor by reason 211 | of your accepting any such warranty or additional liability. 212 | 213 | END OF TERMS AND CONDITIONS 214 | 215 | APPENDIX: How to apply the Apache License to your work. 216 | 217 | To apply the Apache License to your work, attach the following 218 | boilerplate notice, with the fields enclosed by brackets "[]" 219 | replaced with your own identifying information. (Don't include 220 | the brackets!) The text should be enclosed in the appropriate 221 | comment syntax for the file format. We also recommend that a 222 | file or class name and description of purpose be included on the 223 | same "printed page" as the copyright notice for easier 224 | identification within third-party archives. 225 | 226 | Copyright [yyyy] [name of copyright owner] 227 | 228 | Licensed under the Apache License, Version 2.0 (the "License"); 229 | you may not use this file except in compliance with the License. 230 | You may obtain a copy of the License at 231 | 232 | http://www.apache.org/licenses/LICENSE-2.0 233 | 234 | Unless required by applicable law or agreed to in writing, software 235 | distributed under the License is distributed on an "AS IS" BASIS, 236 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 237 | See the License for the specific language governing permissions and 238 | limitations under the License. 239 | 240 | ================================================================ 241 | 242 | github.com/davecgh/go-spew 243 | https://github.com/davecgh/go-spew 244 | ---------------------------------------------------------------- 245 | ISC License 246 | 247 | Copyright (c) 2012-2016 Dave Collins 248 | 249 | Permission to use, copy, modify, and distribute this software for any 250 | purpose with or without fee is hereby granted, provided that the above 251 | copyright notice and this permission notice appear in all copies. 252 | 253 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 254 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 255 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 256 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 257 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 258 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 259 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 260 | 261 | ================================================================ 262 | 263 | github.com/dustin/go-humanize 264 | https://github.com/dustin/go-humanize 265 | ---------------------------------------------------------------- 266 | Copyright (c) 2005-2008 Dustin Sallings 267 | 268 | Permission is hereby granted, free of charge, to any person obtaining a copy 269 | of this software and associated documentation files (the "Software"), to deal 270 | in the Software without restriction, including without limitation the rights 271 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 272 | copies of the Software, and to permit persons to whom the Software is 273 | furnished to do so, subject to the following conditions: 274 | 275 | The above copyright notice and this permission notice shall be included in 276 | all copies or substantial portions of the Software. 277 | 278 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 279 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 280 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 281 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 282 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 283 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 284 | SOFTWARE. 285 | 286 | 287 | 288 | ================================================================ 289 | 290 | github.com/golang/glog 291 | https://github.com/golang/glog 292 | ---------------------------------------------------------------- 293 | Apache License 294 | Version 2.0, January 2004 295 | http://www.apache.org/licenses/ 296 | 297 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 298 | 299 | 1. Definitions. 300 | 301 | "License" shall mean the terms and conditions for use, reproduction, and 302 | distribution as defined by Sections 1 through 9 of this document. 303 | 304 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 305 | owner that is granting the License. 306 | 307 | "Legal Entity" shall mean the union of the acting entity and all other entities 308 | that control, are controlled by, or are under common control with that entity. 309 | For the purposes of this definition, "control" means (i) the power, direct or 310 | indirect, to cause the direction or management of such entity, whether by 311 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 312 | outstanding shares, or (iii) beneficial ownership of such entity. 313 | 314 | "You" (or "Your") shall mean an individual or Legal Entity exercising 315 | permissions granted by this License. 316 | 317 | "Source" form shall mean the preferred form for making modifications, including 318 | but not limited to software source code, documentation source, and configuration 319 | files. 320 | 321 | "Object" form shall mean any form resulting from mechanical transformation or 322 | translation of a Source form, including but not limited to compiled object code, 323 | generated documentation, and conversions to other media types. 324 | 325 | "Work" shall mean the work of authorship, whether in Source or Object form, made 326 | available under the License, as indicated by a copyright notice that is included 327 | in or attached to the work (an example is provided in the Appendix below). 328 | 329 | "Derivative Works" shall mean any work, whether in Source or Object form, that 330 | is based on (or derived from) the Work and for which the editorial revisions, 331 | annotations, elaborations, or other modifications represent, as a whole, an 332 | original work of authorship. For the purposes of this License, Derivative Works 333 | shall not include works that remain separable from, or merely link (or bind by 334 | name) to the interfaces of, the Work and Derivative Works thereof. 335 | 336 | "Contribution" shall mean any work of authorship, including the original version 337 | of the Work and any modifications or additions to that Work or Derivative Works 338 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 339 | by the copyright owner or by an individual or Legal Entity authorized to submit 340 | on behalf of the copyright owner. For the purposes of this definition, 341 | "submitted" means any form of electronic, verbal, or written communication sent 342 | to the Licensor or its representatives, including but not limited to 343 | communication on electronic mailing lists, source code control systems, and 344 | issue tracking systems that are managed by, or on behalf of, the Licensor for 345 | the purpose of discussing and improving the Work, but excluding communication 346 | that is conspicuously marked or otherwise designated in writing by the copyright 347 | owner as "Not a Contribution." 348 | 349 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 350 | of whom a Contribution has been received by Licensor and subsequently 351 | incorporated within the Work. 352 | 353 | 2. Grant of Copyright License. 354 | 355 | Subject to the terms and conditions of this License, each Contributor hereby 356 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 357 | irrevocable copyright license to reproduce, prepare Derivative Works of, 358 | publicly display, publicly perform, sublicense, and distribute the Work and such 359 | Derivative Works in Source or Object form. 360 | 361 | 3. Grant of Patent License. 362 | 363 | Subject to the terms and conditions of this License, each Contributor hereby 364 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 365 | irrevocable (except as stated in this section) patent license to make, have 366 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 367 | such license applies only to those patent claims licensable by such Contributor 368 | that are necessarily infringed by their Contribution(s) alone or by combination 369 | of their Contribution(s) with the Work to which such Contribution(s) was 370 | submitted. If You institute patent litigation against any entity (including a 371 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 372 | Contribution incorporated within the Work constitutes direct or contributory 373 | patent infringement, then any patent licenses granted to You under this License 374 | for that Work shall terminate as of the date such litigation is filed. 375 | 376 | 4. Redistribution. 377 | 378 | You may reproduce and distribute copies of the Work or Derivative Works thereof 379 | in any medium, with or without modifications, and in Source or Object form, 380 | provided that You meet the following conditions: 381 | 382 | You must give any other recipients of the Work or Derivative Works a copy of 383 | this License; and 384 | You must cause any modified files to carry prominent notices stating that You 385 | changed the files; and 386 | You must retain, in the Source form of any Derivative Works that You distribute, 387 | all copyright, patent, trademark, and attribution notices from the Source form 388 | of the Work, excluding those notices that do not pertain to any part of the 389 | Derivative Works; and 390 | If the Work includes a "NOTICE" text file as part of its distribution, then any 391 | Derivative Works that You distribute must include a readable copy of the 392 | attribution notices contained within such NOTICE file, excluding those notices 393 | that do not pertain to any part of the Derivative Works, in at least one of the 394 | following places: within a NOTICE text file distributed as part of the 395 | Derivative Works; within the Source form or documentation, if provided along 396 | with the Derivative Works; or, within a display generated by the Derivative 397 | Works, if and wherever such third-party notices normally appear. The contents of 398 | the NOTICE file are for informational purposes only and do not modify the 399 | License. You may add Your own attribution notices within Derivative Works that 400 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 401 | provided that such additional attribution notices cannot be construed as 402 | modifying the License. 403 | You may add Your own copyright statement to Your modifications and may provide 404 | additional or different license terms and conditions for use, reproduction, or 405 | distribution of Your modifications, or for any such Derivative Works as a whole, 406 | provided Your use, reproduction, and distribution of the Work otherwise complies 407 | with the conditions stated in this License. 408 | 409 | 5. Submission of Contributions. 410 | 411 | Unless You explicitly state otherwise, any Contribution intentionally submitted 412 | for inclusion in the Work by You to the Licensor shall be under the terms and 413 | conditions of this License, without any additional terms or conditions. 414 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 415 | any separate license agreement you may have executed with Licensor regarding 416 | such Contributions. 417 | 418 | 6. Trademarks. 419 | 420 | This License does not grant permission to use the trade names, trademarks, 421 | service marks, or product names of the Licensor, except as required for 422 | reasonable and customary use in describing the origin of the Work and 423 | reproducing the content of the NOTICE file. 424 | 425 | 7. Disclaimer of Warranty. 426 | 427 | Unless required by applicable law or agreed to in writing, Licensor provides the 428 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 429 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 430 | including, without limitation, any warranties or conditions of TITLE, 431 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 432 | solely responsible for determining the appropriateness of using or 433 | redistributing the Work and assume any risks associated with Your exercise of 434 | permissions under this License. 435 | 436 | 8. Limitation of Liability. 437 | 438 | In no event and under no legal theory, whether in tort (including negligence), 439 | contract, or otherwise, unless required by applicable law (such as deliberate 440 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 441 | liable to You for damages, including any direct, indirect, special, incidental, 442 | or consequential damages of any character arising as a result of this License or 443 | out of the use or inability to use the Work (including but not limited to 444 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 445 | any and all other commercial damages or losses), even if such Contributor has 446 | been advised of the possibility of such damages. 447 | 448 | 9. Accepting Warranty or Additional Liability. 449 | 450 | While redistributing the Work or Derivative Works thereof, You may choose to 451 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 452 | other liability obligations and/or rights consistent with this License. However, 453 | in accepting such obligations, You may act only on Your own behalf and on Your 454 | sole responsibility, not on behalf of any other Contributor, and only if You 455 | agree to indemnify, defend, and hold each Contributor harmless for any liability 456 | incurred by, or claims asserted against, such Contributor by reason of your 457 | accepting any such warranty or additional liability. 458 | 459 | END OF TERMS AND CONDITIONS 460 | 461 | APPENDIX: How to apply the Apache License to your work 462 | 463 | To apply the Apache License to your work, attach the following boilerplate 464 | notice, with the fields enclosed by brackets "[]" replaced with your own 465 | identifying information. (Don't include the brackets!) The text should be 466 | enclosed in the appropriate comment syntax for the file format. We also 467 | recommend that a file or class name and description of purpose be included on 468 | the same "printed page" as the copyright notice for easier identification within 469 | third-party archives. 470 | 471 | Copyright [yyyy] [name of copyright owner] 472 | 473 | Licensed under the Apache License, Version 2.0 (the "License"); 474 | you may not use this file except in compliance with the License. 475 | You may obtain a copy of the License at 476 | 477 | http://www.apache.org/licenses/LICENSE-2.0 478 | 479 | Unless required by applicable law or agreed to in writing, software 480 | distributed under the License is distributed on an "AS IS" BASIS, 481 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 482 | See the License for the specific language governing permissions and 483 | limitations under the License. 484 | 485 | ================================================================ 486 | 487 | github.com/golang/protobuf 488 | https://github.com/golang/protobuf 489 | ---------------------------------------------------------------- 490 | Copyright 2010 The Go Authors. All rights reserved. 491 | 492 | Redistribution and use in source and binary forms, with or without 493 | modification, are permitted provided that the following conditions are 494 | met: 495 | 496 | * Redistributions of source code must retain the above copyright 497 | notice, this list of conditions and the following disclaimer. 498 | * Redistributions in binary form must reproduce the above 499 | copyright notice, this list of conditions and the following disclaimer 500 | in the documentation and/or other materials provided with the 501 | distribution. 502 | * Neither the name of Google Inc. nor the names of its 503 | contributors may be used to endorse or promote products derived from 504 | this software without specific prior written permission. 505 | 506 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 507 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 508 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 509 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 510 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 511 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 512 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 513 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 514 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 515 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 516 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 517 | 518 | 519 | ================================================================ 520 | 521 | github.com/google/go-cmp 522 | https://github.com/google/go-cmp 523 | ---------------------------------------------------------------- 524 | Copyright (c) 2017 The Go Authors. All rights reserved. 525 | 526 | Redistribution and use in source and binary forms, with or without 527 | modification, are permitted provided that the following conditions are 528 | met: 529 | 530 | * Redistributions of source code must retain the above copyright 531 | notice, this list of conditions and the following disclaimer. 532 | * Redistributions in binary form must reproduce the above 533 | copyright notice, this list of conditions and the following disclaimer 534 | in the documentation and/or other materials provided with the 535 | distribution. 536 | * Neither the name of Google Inc. nor the names of its 537 | contributors may be used to endorse or promote products derived from 538 | this software without specific prior written permission. 539 | 540 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 541 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 542 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 543 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 544 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 545 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 546 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 547 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 548 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 549 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 550 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 551 | 552 | ================================================================ 553 | 554 | github.com/google/martian 555 | https://github.com/google/martian 556 | ---------------------------------------------------------------- 557 | 558 | Apache License 559 | Version 2.0, January 2004 560 | http://www.apache.org/licenses/ 561 | 562 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 563 | 564 | 1. Definitions. 565 | 566 | "License" shall mean the terms and conditions for use, reproduction, 567 | and distribution as defined by Sections 1 through 9 of this document. 568 | 569 | "Licensor" shall mean the copyright owner or entity authorized by 570 | the copyright owner that is granting the License. 571 | 572 | "Legal Entity" shall mean the union of the acting entity and all 573 | other entities that control, are controlled by, or are under common 574 | control with that entity. For the purposes of this definition, 575 | "control" means (i) the power, direct or indirect, to cause the 576 | direction or management of such entity, whether by contract or 577 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 578 | outstanding shares, or (iii) beneficial ownership of such entity. 579 | 580 | "You" (or "Your") shall mean an individual or Legal Entity 581 | exercising permissions granted by this License. 582 | 583 | "Source" form shall mean the preferred form for making modifications, 584 | including but not limited to software source code, documentation 585 | source, and configuration files. 586 | 587 | "Object" form shall mean any form resulting from mechanical 588 | transformation or translation of a Source form, including but 589 | not limited to compiled object code, generated documentation, 590 | and conversions to other media types. 591 | 592 | "Work" shall mean the work of authorship, whether in Source or 593 | Object form, made available under the License, as indicated by a 594 | copyright notice that is included in or attached to the work 595 | (an example is provided in the Appendix below). 596 | 597 | "Derivative Works" shall mean any work, whether in Source or Object 598 | form, that is based on (or derived from) the Work and for which the 599 | editorial revisions, annotations, elaborations, or other modifications 600 | represent, as a whole, an original work of authorship. For the purposes 601 | of this License, Derivative Works shall not include works that remain 602 | separable from, or merely link (or bind by name) to the interfaces of, 603 | the Work and Derivative Works thereof. 604 | 605 | "Contribution" shall mean any work of authorship, including 606 | the original version of the Work and any modifications or additions 607 | to that Work or Derivative Works thereof, that is intentionally 608 | submitted to Licensor for inclusion in the Work by the copyright owner 609 | or by an individual or Legal Entity authorized to submit on behalf of 610 | the copyright owner. For the purposes of this definition, "submitted" 611 | means any form of electronic, verbal, or written communication sent 612 | to the Licensor or its representatives, including but not limited to 613 | communication on electronic mailing lists, source code control systems, 614 | and issue tracking systems that are managed by, or on behalf of, the 615 | Licensor for the purpose of discussing and improving the Work, but 616 | excluding communication that is conspicuously marked or otherwise 617 | designated in writing by the copyright owner as "Not a Contribution." 618 | 619 | "Contributor" shall mean Licensor and any individual or Legal Entity 620 | on behalf of whom a Contribution has been received by Licensor and 621 | subsequently incorporated within the Work. 622 | 623 | 2. Grant of Copyright License. Subject to the terms and conditions of 624 | this License, each Contributor hereby grants to You a perpetual, 625 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 626 | copyright license to reproduce, prepare Derivative Works of, 627 | publicly display, publicly perform, sublicense, and distribute the 628 | Work and such Derivative Works in Source or Object form. 629 | 630 | 3. Grant of Patent License. Subject to the terms and conditions of 631 | this License, each Contributor hereby grants to You a perpetual, 632 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 633 | (except as stated in this section) patent license to make, have made, 634 | use, offer to sell, sell, import, and otherwise transfer the Work, 635 | where such license applies only to those patent claims licensable 636 | by such Contributor that are necessarily infringed by their 637 | Contribution(s) alone or by combination of their Contribution(s) 638 | with the Work to which such Contribution(s) was submitted. If You 639 | institute patent litigation against any entity (including a 640 | cross-claim or counterclaim in a lawsuit) alleging that the Work 641 | or a Contribution incorporated within the Work constitutes direct 642 | or contributory patent infringement, then any patent licenses 643 | granted to You under this License for that Work shall terminate 644 | as of the date such litigation is filed. 645 | 646 | 4. Redistribution. You may reproduce and distribute copies of the 647 | Work or Derivative Works thereof in any medium, with or without 648 | modifications, and in Source or Object form, provided that You 649 | meet the following conditions: 650 | 651 | (a) You must give any other recipients of the Work or 652 | Derivative Works a copy of this License; and 653 | 654 | (b) You must cause any modified files to carry prominent notices 655 | stating that You changed the files; and 656 | 657 | (c) You must retain, in the Source form of any Derivative Works 658 | that You distribute, all copyright, patent, trademark, and 659 | attribution notices from the Source form of the Work, 660 | excluding those notices that do not pertain to any part of 661 | the Derivative Works; and 662 | 663 | (d) If the Work includes a "NOTICE" text file as part of its 664 | distribution, then any Derivative Works that You distribute must 665 | include a readable copy of the attribution notices contained 666 | within such NOTICE file, excluding those notices that do not 667 | pertain to any part of the Derivative Works, in at least one 668 | of the following places: within a NOTICE text file distributed 669 | as part of the Derivative Works; within the Source form or 670 | documentation, if provided along with the Derivative Works; or, 671 | within a display generated by the Derivative Works, if and 672 | wherever such third-party notices normally appear. The contents 673 | of the NOTICE file are for informational purposes only and 674 | do not modify the License. You may add Your own attribution 675 | notices within Derivative Works that You distribute, alongside 676 | or as an addendum to the NOTICE text from the Work, provided 677 | that such additional attribution notices cannot be construed 678 | as modifying the License. 679 | 680 | You may add Your own copyright statement to Your modifications and 681 | may provide additional or different license terms and conditions 682 | for use, reproduction, or distribution of Your modifications, or 683 | for any such Derivative Works as a whole, provided Your use, 684 | reproduction, and distribution of the Work otherwise complies with 685 | the conditions stated in this License. 686 | 687 | 5. Submission of Contributions. Unless You explicitly state otherwise, 688 | any Contribution intentionally submitted for inclusion in the Work 689 | by You to the Licensor shall be under the terms and conditions of 690 | this License, without any additional terms or conditions. 691 | Notwithstanding the above, nothing herein shall supersede or modify 692 | the terms of any separate license agreement you may have executed 693 | with Licensor regarding such Contributions. 694 | 695 | 6. Trademarks. This License does not grant permission to use the trade 696 | names, trademarks, service marks, or product names of the Licensor, 697 | except as required for reasonable and customary use in describing the 698 | origin of the Work and reproducing the content of the NOTICE file. 699 | 700 | 7. Disclaimer of Warranty. Unless required by applicable law or 701 | agreed to in writing, Licensor provides the Work (and each 702 | Contributor provides its Contributions) on an "AS IS" BASIS, 703 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 704 | implied, including, without limitation, any warranties or conditions 705 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 706 | PARTICULAR PURPOSE. You are solely responsible for determining the 707 | appropriateness of using or redistributing the Work and assume any 708 | risks associated with Your exercise of permissions under this License. 709 | 710 | 8. Limitation of Liability. In no event and under no legal theory, 711 | whether in tort (including negligence), contract, or otherwise, 712 | unless required by applicable law (such as deliberate and grossly 713 | negligent acts) or agreed to in writing, shall any Contributor be 714 | liable to You for damages, including any direct, indirect, special, 715 | incidental, or consequential damages of any character arising as a 716 | result of this License or out of the use or inability to use the 717 | Work (including but not limited to damages for loss of goodwill, 718 | work stoppage, computer failure or malfunction, or any and all 719 | other commercial damages or losses), even if such Contributor 720 | has been advised of the possibility of such damages. 721 | 722 | 9. Accepting Warranty or Additional Liability. While redistributing 723 | the Work or Derivative Works thereof, You may choose to offer, 724 | and charge a fee for, acceptance of support, warranty, indemnity, 725 | or other liability obligations and/or rights consistent with this 726 | License. However, in accepting such obligations, You may act only 727 | on Your own behalf and on Your sole responsibility, not on behalf 728 | of any other Contributor, and only if You agree to indemnify, 729 | defend, and hold each Contributor harmless for any liability 730 | incurred by, or claims asserted against, such Contributor by reason 731 | of your accepting any such warranty or additional liability. 732 | 733 | END OF TERMS AND CONDITIONS 734 | 735 | APPENDIX: How to apply the Apache License to your work. 736 | 737 | To apply the Apache License to your work, attach the following 738 | boilerplate notice, with the fields enclosed by brackets "[]" 739 | replaced with your own identifying information. (Don't include 740 | the brackets!) The text should be enclosed in the appropriate 741 | comment syntax for the file format. We also recommend that a 742 | file or class name and description of purpose be included on the 743 | same "printed page" as the copyright notice for easier 744 | identification within third-party archives. 745 | 746 | Copyright [yyyy] [name of copyright owner] 747 | 748 | Licensed under the Apache License, Version 2.0 (the "License"); 749 | you may not use this file except in compliance with the License. 750 | You may obtain a copy of the License at 751 | 752 | http://www.apache.org/licenses/LICENSE-2.0 753 | 754 | Unless required by applicable law or agreed to in writing, software 755 | distributed under the License is distributed on an "AS IS" BASIS, 756 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 757 | See the License for the specific language governing permissions and 758 | limitations under the License. 759 | 760 | ================================================================ 761 | 762 | github.com/googleapis/gax-go/v2 763 | https://github.com/googleapis/gax-go/v2 764 | ---------------------------------------------------------------- 765 | Copyright 2016, Google Inc. 766 | All rights reserved. 767 | Redistribution and use in source and binary forms, with or without 768 | modification, are permitted provided that the following conditions are 769 | met: 770 | 771 | * Redistributions of source code must retain the above copyright 772 | notice, this list of conditions and the following disclaimer. 773 | * Redistributions in binary form must reproduce the above 774 | copyright notice, this list of conditions and the following disclaimer 775 | in the documentation and/or other materials provided with the 776 | distribution. 777 | * Neither the name of Google Inc. nor the names of its 778 | contributors may be used to endorse or promote products derived from 779 | this software without specific prior written permission. 780 | 781 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 782 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 783 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 784 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 785 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 786 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 787 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 788 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 789 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 790 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 791 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 792 | 793 | ================================================================ 794 | 795 | github.com/gorilla/websocket 796 | https://github.com/gorilla/websocket 797 | ---------------------------------------------------------------- 798 | Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. 799 | 800 | Redistribution and use in source and binary forms, with or without 801 | modification, are permitted provided that the following conditions are met: 802 | 803 | Redistributions of source code must retain the above copyright notice, this 804 | list of conditions and the following disclaimer. 805 | 806 | Redistributions in binary form must reproduce the above copyright notice, 807 | this list of conditions and the following disclaimer in the documentation 808 | and/or other materials provided with the distribution. 809 | 810 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 811 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 812 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 813 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 814 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 815 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 816 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 817 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 818 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 819 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 820 | 821 | ================================================================ 822 | 823 | github.com/hashicorp/golang-lru 824 | https://github.com/hashicorp/golang-lru 825 | ---------------------------------------------------------------- 826 | Mozilla Public License, version 2.0 827 | 828 | 1. Definitions 829 | 830 | 1.1. "Contributor" 831 | 832 | means each individual or legal entity that creates, contributes to the 833 | creation of, or owns Covered Software. 834 | 835 | 1.2. "Contributor Version" 836 | 837 | means the combination of the Contributions of others (if any) used by a 838 | Contributor and that particular Contributor's Contribution. 839 | 840 | 1.3. "Contribution" 841 | 842 | means Covered Software of a particular Contributor. 843 | 844 | 1.4. "Covered Software" 845 | 846 | means Source Code Form to which the initial Contributor has attached the 847 | notice in Exhibit A, the Executable Form of such Source Code Form, and 848 | Modifications of such Source Code Form, in each case including portions 849 | thereof. 850 | 851 | 1.5. "Incompatible With Secondary Licenses" 852 | means 853 | 854 | a. that the initial Contributor has attached the notice described in 855 | Exhibit B to the Covered Software; or 856 | 857 | b. that the Covered Software was made available under the terms of 858 | version 1.1 or earlier of the License, but not also under the terms of 859 | a Secondary License. 860 | 861 | 1.6. "Executable Form" 862 | 863 | means any form of the work other than Source Code Form. 864 | 865 | 1.7. "Larger Work" 866 | 867 | means a work that combines Covered Software with other material, in a 868 | separate file or files, that is not Covered Software. 869 | 870 | 1.8. "License" 871 | 872 | means this document. 873 | 874 | 1.9. "Licensable" 875 | 876 | means having the right to grant, to the maximum extent possible, whether 877 | at the time of the initial grant or subsequently, any and all of the 878 | rights conveyed by this License. 879 | 880 | 1.10. "Modifications" 881 | 882 | means any of the following: 883 | 884 | a. any file in Source Code Form that results from an addition to, 885 | deletion from, or modification of the contents of Covered Software; or 886 | 887 | b. any new file in Source Code Form that contains any Covered Software. 888 | 889 | 1.11. "Patent Claims" of a Contributor 890 | 891 | means any patent claim(s), including without limitation, method, 892 | process, and apparatus claims, in any patent Licensable by such 893 | Contributor that would be infringed, but for the grant of the License, 894 | by the making, using, selling, offering for sale, having made, import, 895 | or transfer of either its Contributions or its Contributor Version. 896 | 897 | 1.12. "Secondary License" 898 | 899 | means either the GNU General Public License, Version 2.0, the GNU Lesser 900 | General Public License, Version 2.1, the GNU Affero General Public 901 | License, Version 3.0, or any later versions of those licenses. 902 | 903 | 1.13. "Source Code Form" 904 | 905 | means the form of the work preferred for making modifications. 906 | 907 | 1.14. "You" (or "Your") 908 | 909 | means an individual or a legal entity exercising rights under this 910 | License. For legal entities, "You" includes any entity that controls, is 911 | controlled by, or is under common control with You. For purposes of this 912 | definition, "control" means (a) the power, direct or indirect, to cause 913 | the direction or management of such entity, whether by contract or 914 | otherwise, or (b) ownership of more than fifty percent (50%) of the 915 | outstanding shares or beneficial ownership of such entity. 916 | 917 | 918 | 2. License Grants and Conditions 919 | 920 | 2.1. Grants 921 | 922 | Each Contributor hereby grants You a world-wide, royalty-free, 923 | non-exclusive license: 924 | 925 | a. under intellectual property rights (other than patent or trademark) 926 | Licensable by such Contributor to use, reproduce, make available, 927 | modify, display, perform, distribute, and otherwise exploit its 928 | Contributions, either on an unmodified basis, with Modifications, or 929 | as part of a Larger Work; and 930 | 931 | b. under Patent Claims of such Contributor to make, use, sell, offer for 932 | sale, have made, import, and otherwise transfer either its 933 | Contributions or its Contributor Version. 934 | 935 | 2.2. Effective Date 936 | 937 | The licenses granted in Section 2.1 with respect to any Contribution 938 | become effective for each Contribution on the date the Contributor first 939 | distributes such Contribution. 940 | 941 | 2.3. Limitations on Grant Scope 942 | 943 | The licenses granted in this Section 2 are the only rights granted under 944 | this License. No additional rights or licenses will be implied from the 945 | distribution or licensing of Covered Software under this License. 946 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 947 | Contributor: 948 | 949 | a. for any code that a Contributor has removed from Covered Software; or 950 | 951 | b. for infringements caused by: (i) Your and any other third party's 952 | modifications of Covered Software, or (ii) the combination of its 953 | Contributions with other software (except as part of its Contributor 954 | Version); or 955 | 956 | c. under Patent Claims infringed by Covered Software in the absence of 957 | its Contributions. 958 | 959 | This License does not grant any rights in the trademarks, service marks, 960 | or logos of any Contributor (except as may be necessary to comply with 961 | the notice requirements in Section 3.4). 962 | 963 | 2.4. Subsequent Licenses 964 | 965 | No Contributor makes additional grants as a result of Your choice to 966 | distribute the Covered Software under a subsequent version of this 967 | License (see Section 10.2) or under the terms of a Secondary License (if 968 | permitted under the terms of Section 3.3). 969 | 970 | 2.5. Representation 971 | 972 | Each Contributor represents that the Contributor believes its 973 | Contributions are its original creation(s) or it has sufficient rights to 974 | grant the rights to its Contributions conveyed by this License. 975 | 976 | 2.6. Fair Use 977 | 978 | This License is not intended to limit any rights You have under 979 | applicable copyright doctrines of fair use, fair dealing, or other 980 | equivalents. 981 | 982 | 2.7. Conditions 983 | 984 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in 985 | Section 2.1. 986 | 987 | 988 | 3. Responsibilities 989 | 990 | 3.1. Distribution of Source Form 991 | 992 | All distribution of Covered Software in Source Code Form, including any 993 | Modifications that You create or to which You contribute, must be under 994 | the terms of this License. You must inform recipients that the Source 995 | Code Form of the Covered Software is governed by the terms of this 996 | License, and how they can obtain a copy of this License. You may not 997 | attempt to alter or restrict the recipients' rights in the Source Code 998 | Form. 999 | 1000 | 3.2. Distribution of Executable Form 1001 | 1002 | If You distribute Covered Software in Executable Form then: 1003 | 1004 | a. such Covered Software must also be made available in Source Code Form, 1005 | as described in Section 3.1, and You must inform recipients of the 1006 | Executable Form how they can obtain a copy of such Source Code Form by 1007 | reasonable means in a timely manner, at a charge no more than the cost 1008 | of distribution to the recipient; and 1009 | 1010 | b. You may distribute such Executable Form under the terms of this 1011 | License, or sublicense it under different terms, provided that the 1012 | license for the Executable Form does not attempt to limit or alter the 1013 | recipients' rights in the Source Code Form under this License. 1014 | 1015 | 3.3. Distribution of a Larger Work 1016 | 1017 | You may create and distribute a Larger Work under terms of Your choice, 1018 | provided that You also comply with the requirements of this License for 1019 | the Covered Software. If the Larger Work is a combination of Covered 1020 | Software with a work governed by one or more Secondary Licenses, and the 1021 | Covered Software is not Incompatible With Secondary Licenses, this 1022 | License permits You to additionally distribute such Covered Software 1023 | under the terms of such Secondary License(s), so that the recipient of 1024 | the Larger Work may, at their option, further distribute the Covered 1025 | Software under the terms of either this License or such Secondary 1026 | License(s). 1027 | 1028 | 3.4. Notices 1029 | 1030 | You may not remove or alter the substance of any license notices 1031 | (including copyright notices, patent notices, disclaimers of warranty, or 1032 | limitations of liability) contained within the Source Code Form of the 1033 | Covered Software, except that You may alter any license notices to the 1034 | extent required to remedy known factual inaccuracies. 1035 | 1036 | 3.5. Application of Additional Terms 1037 | 1038 | You may choose to offer, and to charge a fee for, warranty, support, 1039 | indemnity or liability obligations to one or more recipients of Covered 1040 | Software. However, You may do so only on Your own behalf, and not on 1041 | behalf of any Contributor. You must make it absolutely clear that any 1042 | such warranty, support, indemnity, or liability obligation is offered by 1043 | You alone, and You hereby agree to indemnify every Contributor for any 1044 | liability incurred by such Contributor as a result of warranty, support, 1045 | indemnity or liability terms You offer. You may include additional 1046 | disclaimers of warranty and limitations of liability specific to any 1047 | jurisdiction. 1048 | 1049 | 4. Inability to Comply Due to Statute or Regulation 1050 | 1051 | If it is impossible for You to comply with any of the terms of this License 1052 | with respect to some or all of the Covered Software due to statute, 1053 | judicial order, or regulation then You must: (a) comply with the terms of 1054 | this License to the maximum extent possible; and (b) describe the 1055 | limitations and the code they affect. Such description must be placed in a 1056 | text file included with all distributions of the Covered Software under 1057 | this License. Except to the extent prohibited by statute or regulation, 1058 | such description must be sufficiently detailed for a recipient of ordinary 1059 | skill to be able to understand it. 1060 | 1061 | 5. Termination 1062 | 1063 | 5.1. The rights granted under this License will terminate automatically if You 1064 | fail to comply with any of its terms. However, if You become compliant, 1065 | then the rights granted under this License from a particular Contributor 1066 | are reinstated (a) provisionally, unless and until such Contributor 1067 | explicitly and finally terminates Your grants, and (b) on an ongoing 1068 | basis, if such Contributor fails to notify You of the non-compliance by 1069 | some reasonable means prior to 60 days after You have come back into 1070 | compliance. Moreover, Your grants from a particular Contributor are 1071 | reinstated on an ongoing basis if such Contributor notifies You of the 1072 | non-compliance by some reasonable means, this is the first time You have 1073 | received notice of non-compliance with this License from such 1074 | Contributor, and You become compliant prior to 30 days after Your receipt 1075 | of the notice. 1076 | 1077 | 5.2. If You initiate litigation against any entity by asserting a patent 1078 | infringement claim (excluding declaratory judgment actions, 1079 | counter-claims, and cross-claims) alleging that a Contributor Version 1080 | directly or indirectly infringes any patent, then the rights granted to 1081 | You by any and all Contributors for the Covered Software under Section 1082 | 2.1 of this License shall terminate. 1083 | 1084 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user 1085 | license agreements (excluding distributors and resellers) which have been 1086 | validly granted by You or Your distributors under this License prior to 1087 | termination shall survive termination. 1088 | 1089 | 6. Disclaimer of Warranty 1090 | 1091 | Covered Software is provided under this License on an "as is" basis, 1092 | without warranty of any kind, either expressed, implied, or statutory, 1093 | including, without limitation, warranties that the Covered Software is free 1094 | of defects, merchantable, fit for a particular purpose or non-infringing. 1095 | The entire risk as to the quality and performance of the Covered Software 1096 | is with You. Should any Covered Software prove defective in any respect, 1097 | You (not any Contributor) assume the cost of any necessary servicing, 1098 | repair, or correction. This disclaimer of warranty constitutes an essential 1099 | part of this License. No use of any Covered Software is authorized under 1100 | this License except under this disclaimer. 1101 | 1102 | 7. Limitation of Liability 1103 | 1104 | Under no circumstances and under no legal theory, whether tort (including 1105 | negligence), contract, or otherwise, shall any Contributor, or anyone who 1106 | distributes Covered Software as permitted above, be liable to You for any 1107 | direct, indirect, special, incidental, or consequential damages of any 1108 | character including, without limitation, damages for lost profits, loss of 1109 | goodwill, work stoppage, computer failure or malfunction, or any and all 1110 | other commercial damages or losses, even if such party shall have been 1111 | informed of the possibility of such damages. This limitation of liability 1112 | shall not apply to liability for death or personal injury resulting from 1113 | such party's negligence to the extent applicable law prohibits such 1114 | limitation. Some jurisdictions do not allow the exclusion or limitation of 1115 | incidental or consequential damages, so this exclusion and limitation may 1116 | not apply to You. 1117 | 1118 | 8. Litigation 1119 | 1120 | Any litigation relating to this License may be brought only in the courts 1121 | of a jurisdiction where the defendant maintains its principal place of 1122 | business and such litigation shall be governed by laws of that 1123 | jurisdiction, without reference to its conflict-of-law provisions. Nothing 1124 | in this Section shall prevent a party's ability to bring cross-claims or 1125 | counter-claims. 1126 | 1127 | 9. Miscellaneous 1128 | 1129 | This License represents the complete agreement concerning the subject 1130 | matter hereof. If any provision of this License is held to be 1131 | unenforceable, such provision shall be reformed only to the extent 1132 | necessary to make it enforceable. Any law or regulation which provides that 1133 | the language of a contract shall be construed against the drafter shall not 1134 | be used to construe this License against a Contributor. 1135 | 1136 | 1137 | 10. Versions of the License 1138 | 1139 | 10.1. New Versions 1140 | 1141 | Mozilla Foundation is the license steward. Except as provided in Section 1142 | 10.3, no one other than the license steward has the right to modify or 1143 | publish new versions of this License. Each version will be given a 1144 | distinguishing version number. 1145 | 1146 | 10.2. Effect of New Versions 1147 | 1148 | You may distribute the Covered Software under the terms of the version 1149 | of the License under which You originally received the Covered Software, 1150 | or under the terms of any subsequent version published by the license 1151 | steward. 1152 | 1153 | 10.3. Modified Versions 1154 | 1155 | If you create software not governed by this License, and you want to 1156 | create a new license for such software, you may create and use a 1157 | modified version of this License if you rename the license and remove 1158 | any references to the name of the license steward (except to note that 1159 | such modified license differs from this License). 1160 | 1161 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 1162 | Licenses If You choose to distribute Source Code Form that is 1163 | Incompatible With Secondary Licenses under the terms of this version of 1164 | the License, the notice described in Exhibit B of this License must be 1165 | attached. 1166 | 1167 | Exhibit A - Source Code Form License Notice 1168 | 1169 | This Source Code Form is subject to the 1170 | terms of the Mozilla Public License, v. 1171 | 2.0. If a copy of the MPL was not 1172 | distributed with this file, You can 1173 | obtain one at 1174 | http://mozilla.org/MPL/2.0/. 1175 | 1176 | If it is not possible or desirable to put the notice in a particular file, 1177 | then You may include the notice in a location (such as a LICENSE file in a 1178 | relevant directory) where a recipient would be likely to look for such a 1179 | notice. 1180 | 1181 | You may add additional accurate notices of copyright ownership. 1182 | 1183 | Exhibit B - "Incompatible With Secondary Licenses" Notice 1184 | 1185 | This Source Code Form is "Incompatible 1186 | With Secondary Licenses", as defined by 1187 | the Mozilla Public License, v. 2.0. 1188 | 1189 | ================================================================ 1190 | 1191 | github.com/lusis/go-slackbot 1192 | https://github.com/lusis/go-slackbot 1193 | ---------------------------------------------------------------- 1194 | The MIT License (MIT) 1195 | 1196 | Copyright (c) 2016 Robots & Pencils 1197 | 1198 | Permission is hereby granted, free of charge, to any person obtaining a copy 1199 | of this software and associated documentation files (the "Software"), to deal 1200 | in the Software without restriction, including without limitation the rights 1201 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1202 | copies of the Software, and to permit persons to whom the Software is 1203 | furnished to do so, subject to the following conditions: 1204 | 1205 | The above copyright notice and this permission notice shall be included in all 1206 | copies or substantial portions of the Software. 1207 | 1208 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1209 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1210 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1211 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1212 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1213 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1214 | SOFTWARE. 1215 | 1216 | ================================================================ 1217 | 1218 | github.com/lusis/slack-test 1219 | https://github.com/lusis/slack-test 1220 | ---------------------------------------------------------------- 1221 | Copyright 2018 @lusis 1222 | 1223 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 1224 | 1225 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 1226 | 1227 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1228 | 1229 | ================================================================ 1230 | 1231 | github.com/nlopes/slack 1232 | https://github.com/nlopes/slack 1233 | ---------------------------------------------------------------- 1234 | Copyright (c) 2015, Norberto Lopes 1235 | All rights reserved. 1236 | 1237 | Redistribution and use in source and binary forms, with or without modification, 1238 | are permitted provided that the following conditions are met: 1239 | 1240 | 1. Redistributions of source code must retain the above copyright notice, this 1241 | list of conditions and the following disclaimer. 1242 | 1243 | 2. Redistributions in binary form must reproduce the above copyright notice, 1244 | this list of conditions and the following disclaimer in the documentation and/or 1245 | other materials provided with the distribution. 1246 | 1247 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 1248 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1249 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 1250 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 1251 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 1252 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 1253 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 1254 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1255 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1256 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1257 | 1258 | ================================================================ 1259 | 1260 | github.com/pkg/errors 1261 | https://github.com/pkg/errors 1262 | ---------------------------------------------------------------- 1263 | Copyright (c) 2015, Dave Cheney 1264 | All rights reserved. 1265 | 1266 | Redistribution and use in source and binary forms, with or without 1267 | modification, are permitted provided that the following conditions are met: 1268 | 1269 | * Redistributions of source code must retain the above copyright notice, this 1270 | list of conditions and the following disclaimer. 1271 | 1272 | * Redistributions in binary form must reproduce the above copyright notice, 1273 | this list of conditions and the following disclaimer in the documentation 1274 | and/or other materials provided with the distribution. 1275 | 1276 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 1277 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1278 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 1279 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 1280 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1281 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 1282 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 1283 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1284 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1285 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1286 | 1287 | ================================================================ 1288 | 1289 | github.com/pmezard/go-difflib 1290 | https://github.com/pmezard/go-difflib 1291 | ---------------------------------------------------------------- 1292 | Copyright (c) 2013, Patrick Mezard 1293 | All rights reserved. 1294 | 1295 | Redistribution and use in source and binary forms, with or without 1296 | modification, are permitted provided that the following conditions are 1297 | met: 1298 | 1299 | Redistributions of source code must retain the above copyright 1300 | notice, this list of conditions and the following disclaimer. 1301 | Redistributions in binary form must reproduce the above copyright 1302 | notice, this list of conditions and the following disclaimer in the 1303 | documentation and/or other materials provided with the distribution. 1304 | The names of its contributors may not be used to endorse or promote 1305 | products derived from this software without specific prior written 1306 | permission. 1307 | 1308 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 1309 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1310 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 1311 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1312 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1313 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 1314 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 1315 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 1316 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 1317 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1318 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1319 | 1320 | ================================================================ 1321 | 1322 | github.com/stretchr/testify 1323 | https://github.com/stretchr/testify 1324 | ---------------------------------------------------------------- 1325 | MIT License 1326 | 1327 | Copyright (c) 2012-2018 Mat Ryer and Tyler Bunnell 1328 | 1329 | Permission is hereby granted, free of charge, to any person obtaining a copy 1330 | of this software and associated documentation files (the "Software"), to deal 1331 | in the Software without restriction, including without limitation the rights 1332 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1333 | copies of the Software, and to permit persons to whom the Software is 1334 | furnished to do so, subject to the following conditions: 1335 | 1336 | The above copyright notice and this permission notice shall be included in all 1337 | copies or substantial portions of the Software. 1338 | 1339 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1340 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1341 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1342 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1343 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1344 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1345 | SOFTWARE. 1346 | 1347 | ================================================================ 1348 | 1349 | go.opencensus.io 1350 | https://go.opencensus.io 1351 | ---------------------------------------------------------------- 1352 | 1353 | Apache License 1354 | Version 2.0, January 2004 1355 | http://www.apache.org/licenses/ 1356 | 1357 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1358 | 1359 | 1. Definitions. 1360 | 1361 | "License" shall mean the terms and conditions for use, reproduction, 1362 | and distribution as defined by Sections 1 through 9 of this document. 1363 | 1364 | "Licensor" shall mean the copyright owner or entity authorized by 1365 | the copyright owner that is granting the License. 1366 | 1367 | "Legal Entity" shall mean the union of the acting entity and all 1368 | other entities that control, are controlled by, or are under common 1369 | control with that entity. For the purposes of this definition, 1370 | "control" means (i) the power, direct or indirect, to cause the 1371 | direction or management of such entity, whether by contract or 1372 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 1373 | outstanding shares, or (iii) beneficial ownership of such entity. 1374 | 1375 | "You" (or "Your") shall mean an individual or Legal Entity 1376 | exercising permissions granted by this License. 1377 | 1378 | "Source" form shall mean the preferred form for making modifications, 1379 | including but not limited to software source code, documentation 1380 | source, and configuration files. 1381 | 1382 | "Object" form shall mean any form resulting from mechanical 1383 | transformation or translation of a Source form, including but 1384 | not limited to compiled object code, generated documentation, 1385 | and conversions to other media types. 1386 | 1387 | "Work" shall mean the work of authorship, whether in Source or 1388 | Object form, made available under the License, as indicated by a 1389 | copyright notice that is included in or attached to the work 1390 | (an example is provided in the Appendix below). 1391 | 1392 | "Derivative Works" shall mean any work, whether in Source or Object 1393 | form, that is based on (or derived from) the Work and for which the 1394 | editorial revisions, annotations, elaborations, or other modifications 1395 | represent, as a whole, an original work of authorship. For the purposes 1396 | of this License, Derivative Works shall not include works that remain 1397 | separable from, or merely link (or bind by name) to the interfaces of, 1398 | the Work and Derivative Works thereof. 1399 | 1400 | "Contribution" shall mean any work of authorship, including 1401 | the original version of the Work and any modifications or additions 1402 | to that Work or Derivative Works thereof, that is intentionally 1403 | submitted to Licensor for inclusion in the Work by the copyright owner 1404 | or by an individual or Legal Entity authorized to submit on behalf of 1405 | the copyright owner. For the purposes of this definition, "submitted" 1406 | means any form of electronic, verbal, or written communication sent 1407 | to the Licensor or its representatives, including but not limited to 1408 | communication on electronic mailing lists, source code control systems, 1409 | and issue tracking systems that are managed by, or on behalf of, the 1410 | Licensor for the purpose of discussing and improving the Work, but 1411 | excluding communication that is conspicuously marked or otherwise 1412 | designated in writing by the copyright owner as "Not a Contribution." 1413 | 1414 | "Contributor" shall mean Licensor and any individual or Legal Entity 1415 | on behalf of whom a Contribution has been received by Licensor and 1416 | subsequently incorporated within the Work. 1417 | 1418 | 2. Grant of Copyright License. Subject to the terms and conditions of 1419 | this License, each Contributor hereby grants to You a perpetual, 1420 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1421 | copyright license to reproduce, prepare Derivative Works of, 1422 | publicly display, publicly perform, sublicense, and distribute the 1423 | Work and such Derivative Works in Source or Object form. 1424 | 1425 | 3. Grant of Patent License. Subject to the terms and conditions of 1426 | this License, each Contributor hereby grants to You a perpetual, 1427 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1428 | (except as stated in this section) patent license to make, have made, 1429 | use, offer to sell, sell, import, and otherwise transfer the Work, 1430 | where such license applies only to those patent claims licensable 1431 | by such Contributor that are necessarily infringed by their 1432 | Contribution(s) alone or by combination of their Contribution(s) 1433 | with the Work to which such Contribution(s) was submitted. If You 1434 | institute patent litigation against any entity (including a 1435 | cross-claim or counterclaim in a lawsuit) alleging that the Work 1436 | or a Contribution incorporated within the Work constitutes direct 1437 | or contributory patent infringement, then any patent licenses 1438 | granted to You under this License for that Work shall terminate 1439 | as of the date such litigation is filed. 1440 | 1441 | 4. Redistribution. You may reproduce and distribute copies of the 1442 | Work or Derivative Works thereof in any medium, with or without 1443 | modifications, and in Source or Object form, provided that You 1444 | meet the following conditions: 1445 | 1446 | (a) You must give any other recipients of the Work or 1447 | Derivative Works a copy of this License; and 1448 | 1449 | (b) You must cause any modified files to carry prominent notices 1450 | stating that You changed the files; and 1451 | 1452 | (c) You must retain, in the Source form of any Derivative Works 1453 | that You distribute, all copyright, patent, trademark, and 1454 | attribution notices from the Source form of the Work, 1455 | excluding those notices that do not pertain to any part of 1456 | the Derivative Works; and 1457 | 1458 | (d) If the Work includes a "NOTICE" text file as part of its 1459 | distribution, then any Derivative Works that You distribute must 1460 | include a readable copy of the attribution notices contained 1461 | within such NOTICE file, excluding those notices that do not 1462 | pertain to any part of the Derivative Works, in at least one 1463 | of the following places: within a NOTICE text file distributed 1464 | as part of the Derivative Works; within the Source form or 1465 | documentation, if provided along with the Derivative Works; or, 1466 | within a display generated by the Derivative Works, if and 1467 | wherever such third-party notices normally appear. The contents 1468 | of the NOTICE file are for informational purposes only and 1469 | do not modify the License. You may add Your own attribution 1470 | notices within Derivative Works that You distribute, alongside 1471 | or as an addendum to the NOTICE text from the Work, provided 1472 | that such additional attribution notices cannot be construed 1473 | as modifying the License. 1474 | 1475 | You may add Your own copyright statement to Your modifications and 1476 | may provide additional or different license terms and conditions 1477 | for use, reproduction, or distribution of Your modifications, or 1478 | for any such Derivative Works as a whole, provided Your use, 1479 | reproduction, and distribution of the Work otherwise complies with 1480 | the conditions stated in this License. 1481 | 1482 | 5. Submission of Contributions. Unless You explicitly state otherwise, 1483 | any Contribution intentionally submitted for inclusion in the Work 1484 | by You to the Licensor shall be under the terms and conditions of 1485 | this License, without any additional terms or conditions. 1486 | Notwithstanding the above, nothing herein shall supersede or modify 1487 | the terms of any separate license agreement you may have executed 1488 | with Licensor regarding such Contributions. 1489 | 1490 | 6. Trademarks. This License does not grant permission to use the trade 1491 | names, trademarks, service marks, or product names of the Licensor, 1492 | except as required for reasonable and customary use in describing the 1493 | origin of the Work and reproducing the content of the NOTICE file. 1494 | 1495 | 7. Disclaimer of Warranty. Unless required by applicable law or 1496 | agreed to in writing, Licensor provides the Work (and each 1497 | Contributor provides its Contributions) on an "AS IS" BASIS, 1498 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1499 | implied, including, without limitation, any warranties or conditions 1500 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 1501 | PARTICULAR PURPOSE. You are solely responsible for determining the 1502 | appropriateness of using or redistributing the Work and assume any 1503 | risks associated with Your exercise of permissions under this License. 1504 | 1505 | 8. Limitation of Liability. In no event and under no legal theory, 1506 | whether in tort (including negligence), contract, or otherwise, 1507 | unless required by applicable law (such as deliberate and grossly 1508 | negligent acts) or agreed to in writing, shall any Contributor be 1509 | liable to You for damages, including any direct, indirect, special, 1510 | incidental, or consequential damages of any character arising as a 1511 | result of this License or out of the use or inability to use the 1512 | Work (including but not limited to damages for loss of goodwill, 1513 | work stoppage, computer failure or malfunction, or any and all 1514 | other commercial damages or losses), even if such Contributor 1515 | has been advised of the possibility of such damages. 1516 | 1517 | 9. Accepting Warranty or Additional Liability. While redistributing 1518 | the Work or Derivative Works thereof, You may choose to offer, 1519 | and charge a fee for, acceptance of support, warranty, indemnity, 1520 | or other liability obligations and/or rights consistent with this 1521 | License. However, in accepting such obligations, You may act only 1522 | on Your own behalf and on Your sole responsibility, not on behalf 1523 | of any other Contributor, and only if You agree to indemnify, 1524 | defend, and hold each Contributor harmless for any liability 1525 | incurred by, or claims asserted against, such Contributor by reason 1526 | of your accepting any such warranty or additional liability. 1527 | 1528 | END OF TERMS AND CONDITIONS 1529 | 1530 | APPENDIX: How to apply the Apache License to your work. 1531 | 1532 | To apply the Apache License to your work, attach the following 1533 | boilerplate notice, with the fields enclosed by brackets "[]" 1534 | replaced with your own identifying information. (Don't include 1535 | the brackets!) The text should be enclosed in the appropriate 1536 | comment syntax for the file format. We also recommend that a 1537 | file or class name and description of purpose be included on the 1538 | same "printed page" as the copyright notice for easier 1539 | identification within third-party archives. 1540 | 1541 | Copyright [yyyy] [name of copyright owner] 1542 | 1543 | Licensed under the Apache License, Version 2.0 (the "License"); 1544 | you may not use this file except in compliance with the License. 1545 | You may obtain a copy of the License at 1546 | 1547 | http://www.apache.org/licenses/LICENSE-2.0 1548 | 1549 | Unless required by applicable law or agreed to in writing, software 1550 | distributed under the License is distributed on an "AS IS" BASIS, 1551 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1552 | See the License for the specific language governing permissions and 1553 | limitations under the License. 1554 | ================================================================ 1555 | 1556 | golang.org/x/net 1557 | https://golang.org/x/net 1558 | ---------------------------------------------------------------- 1559 | Copyright (c) 2009 The Go Authors. All rights reserved. 1560 | 1561 | Redistribution and use in source and binary forms, with or without 1562 | modification, are permitted provided that the following conditions are 1563 | met: 1564 | 1565 | * Redistributions of source code must retain the above copyright 1566 | notice, this list of conditions and the following disclaimer. 1567 | * Redistributions in binary form must reproduce the above 1568 | copyright notice, this list of conditions and the following disclaimer 1569 | in the documentation and/or other materials provided with the 1570 | distribution. 1571 | * Neither the name of Google Inc. nor the names of its 1572 | contributors may be used to endorse or promote products derived from 1573 | this software without specific prior written permission. 1574 | 1575 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1576 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1577 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1578 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1579 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1580 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1581 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1582 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1583 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1584 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1585 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1586 | 1587 | ================================================================ 1588 | 1589 | golang.org/x/oauth2 1590 | https://golang.org/x/oauth2 1591 | ---------------------------------------------------------------- 1592 | Copyright (c) 2009 The Go Authors. All rights reserved. 1593 | 1594 | Redistribution and use in source and binary forms, with or without 1595 | modification, are permitted provided that the following conditions are 1596 | met: 1597 | 1598 | * Redistributions of source code must retain the above copyright 1599 | notice, this list of conditions and the following disclaimer. 1600 | * Redistributions in binary form must reproduce the above 1601 | copyright notice, this list of conditions and the following disclaimer 1602 | in the documentation and/or other materials provided with the 1603 | distribution. 1604 | * Neither the name of Google Inc. nor the names of its 1605 | contributors may be used to endorse or promote products derived from 1606 | this software without specific prior written permission. 1607 | 1608 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1609 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1610 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1611 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1612 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1613 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1614 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1615 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1616 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1617 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1618 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1619 | 1620 | ================================================================ 1621 | 1622 | golang.org/x/sync 1623 | https://golang.org/x/sync 1624 | ---------------------------------------------------------------- 1625 | Copyright (c) 2009 The Go Authors. All rights reserved. 1626 | 1627 | Redistribution and use in source and binary forms, with or without 1628 | modification, are permitted provided that the following conditions are 1629 | met: 1630 | 1631 | * Redistributions of source code must retain the above copyright 1632 | notice, this list of conditions and the following disclaimer. 1633 | * Redistributions in binary form must reproduce the above 1634 | copyright notice, this list of conditions and the following disclaimer 1635 | in the documentation and/or other materials provided with the 1636 | distribution. 1637 | * Neither the name of Google Inc. nor the names of its 1638 | contributors may be used to endorse or promote products derived from 1639 | this software without specific prior written permission. 1640 | 1641 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1642 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1643 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1644 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1645 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1646 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1647 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1648 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1649 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1650 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1651 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1652 | 1653 | ================================================================ 1654 | 1655 | golang.org/x/sys 1656 | https://golang.org/x/sys 1657 | ---------------------------------------------------------------- 1658 | Copyright (c) 2009 The Go Authors. All rights reserved. 1659 | 1660 | Redistribution and use in source and binary forms, with or without 1661 | modification, are permitted provided that the following conditions are 1662 | met: 1663 | 1664 | * Redistributions of source code must retain the above copyright 1665 | notice, this list of conditions and the following disclaimer. 1666 | * Redistributions in binary form must reproduce the above 1667 | copyright notice, this list of conditions and the following disclaimer 1668 | in the documentation and/or other materials provided with the 1669 | distribution. 1670 | * Neither the name of Google Inc. nor the names of its 1671 | contributors may be used to endorse or promote products derived from 1672 | this software without specific prior written permission. 1673 | 1674 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1675 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1676 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1677 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1678 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1679 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1680 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1681 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1682 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1683 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1684 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1685 | 1686 | ================================================================ 1687 | 1688 | golang.org/x/text 1689 | https://golang.org/x/text 1690 | ---------------------------------------------------------------- 1691 | Copyright (c) 2009 The Go Authors. All rights reserved. 1692 | 1693 | Redistribution and use in source and binary forms, with or without 1694 | modification, are permitted provided that the following conditions are 1695 | met: 1696 | 1697 | * Redistributions of source code must retain the above copyright 1698 | notice, this list of conditions and the following disclaimer. 1699 | * Redistributions in binary form must reproduce the above 1700 | copyright notice, this list of conditions and the following disclaimer 1701 | in the documentation and/or other materials provided with the 1702 | distribution. 1703 | * Neither the name of Google Inc. nor the names of its 1704 | contributors may be used to endorse or promote products derived from 1705 | this software without specific prior written permission. 1706 | 1707 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1708 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1709 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1710 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1711 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1712 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1713 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1714 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1715 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1716 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1717 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1718 | 1719 | ================================================================ 1720 | 1721 | google.golang.org/api 1722 | https://google.golang.org/api 1723 | ---------------------------------------------------------------- 1724 | Copyright (c) 2011 Google Inc. All rights reserved. 1725 | 1726 | Redistribution and use in source and binary forms, with or without 1727 | modification, are permitted provided that the following conditions are 1728 | met: 1729 | 1730 | * Redistributions of source code must retain the above copyright 1731 | notice, this list of conditions and the following disclaimer. 1732 | * Redistributions in binary form must reproduce the above 1733 | copyright notice, this list of conditions and the following disclaimer 1734 | in the documentation and/or other materials provided with the 1735 | distribution. 1736 | * Neither the name of Google Inc. nor the names of its 1737 | contributors may be used to endorse or promote products derived from 1738 | this software without specific prior written permission. 1739 | 1740 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1741 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1742 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1743 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1744 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1745 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1746 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1747 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1748 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1749 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1750 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1751 | 1752 | ================================================================ 1753 | 1754 | google.golang.org/appengine 1755 | https://google.golang.org/appengine 1756 | ---------------------------------------------------------------- 1757 | 1758 | Apache License 1759 | Version 2.0, January 2004 1760 | http://www.apache.org/licenses/ 1761 | 1762 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1763 | 1764 | 1. Definitions. 1765 | 1766 | "License" shall mean the terms and conditions for use, reproduction, 1767 | and distribution as defined by Sections 1 through 9 of this document. 1768 | 1769 | "Licensor" shall mean the copyright owner or entity authorized by 1770 | the copyright owner that is granting the License. 1771 | 1772 | "Legal Entity" shall mean the union of the acting entity and all 1773 | other entities that control, are controlled by, or are under common 1774 | control with that entity. For the purposes of this definition, 1775 | "control" means (i) the power, direct or indirect, to cause the 1776 | direction or management of such entity, whether by contract or 1777 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 1778 | outstanding shares, or (iii) beneficial ownership of such entity. 1779 | 1780 | "You" (or "Your") shall mean an individual or Legal Entity 1781 | exercising permissions granted by this License. 1782 | 1783 | "Source" form shall mean the preferred form for making modifications, 1784 | including but not limited to software source code, documentation 1785 | source, and configuration files. 1786 | 1787 | "Object" form shall mean any form resulting from mechanical 1788 | transformation or translation of a Source form, including but 1789 | not limited to compiled object code, generated documentation, 1790 | and conversions to other media types. 1791 | 1792 | "Work" shall mean the work of authorship, whether in Source or 1793 | Object form, made available under the License, as indicated by a 1794 | copyright notice that is included in or attached to the work 1795 | (an example is provided in the Appendix below). 1796 | 1797 | "Derivative Works" shall mean any work, whether in Source or Object 1798 | form, that is based on (or derived from) the Work and for which the 1799 | editorial revisions, annotations, elaborations, or other modifications 1800 | represent, as a whole, an original work of authorship. For the purposes 1801 | of this License, Derivative Works shall not include works that remain 1802 | separable from, or merely link (or bind by name) to the interfaces of, 1803 | the Work and Derivative Works thereof. 1804 | 1805 | "Contribution" shall mean any work of authorship, including 1806 | the original version of the Work and any modifications or additions 1807 | to that Work or Derivative Works thereof, that is intentionally 1808 | submitted to Licensor for inclusion in the Work by the copyright owner 1809 | or by an individual or Legal Entity authorized to submit on behalf of 1810 | the copyright owner. For the purposes of this definition, "submitted" 1811 | means any form of electronic, verbal, or written communication sent 1812 | to the Licensor or its representatives, including but not limited to 1813 | communication on electronic mailing lists, source code control systems, 1814 | and issue tracking systems that are managed by, or on behalf of, the 1815 | Licensor for the purpose of discussing and improving the Work, but 1816 | excluding communication that is conspicuously marked or otherwise 1817 | designated in writing by the copyright owner as "Not a Contribution." 1818 | 1819 | "Contributor" shall mean Licensor and any individual or Legal Entity 1820 | on behalf of whom a Contribution has been received by Licensor and 1821 | subsequently incorporated within the Work. 1822 | 1823 | 2. Grant of Copyright License. Subject to the terms and conditions of 1824 | this License, each Contributor hereby grants to You a perpetual, 1825 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1826 | copyright license to reproduce, prepare Derivative Works of, 1827 | publicly display, publicly perform, sublicense, and distribute the 1828 | Work and such Derivative Works in Source or Object form. 1829 | 1830 | 3. Grant of Patent License. Subject to the terms and conditions of 1831 | this License, each Contributor hereby grants to You a perpetual, 1832 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1833 | (except as stated in this section) patent license to make, have made, 1834 | use, offer to sell, sell, import, and otherwise transfer the Work, 1835 | where such license applies only to those patent claims licensable 1836 | by such Contributor that are necessarily infringed by their 1837 | Contribution(s) alone or by combination of their Contribution(s) 1838 | with the Work to which such Contribution(s) was submitted. If You 1839 | institute patent litigation against any entity (including a 1840 | cross-claim or counterclaim in a lawsuit) alleging that the Work 1841 | or a Contribution incorporated within the Work constitutes direct 1842 | or contributory patent infringement, then any patent licenses 1843 | granted to You under this License for that Work shall terminate 1844 | as of the date such litigation is filed. 1845 | 1846 | 4. Redistribution. You may reproduce and distribute copies of the 1847 | Work or Derivative Works thereof in any medium, with or without 1848 | modifications, and in Source or Object form, provided that You 1849 | meet the following conditions: 1850 | 1851 | (a) You must give any other recipients of the Work or 1852 | Derivative Works a copy of this License; and 1853 | 1854 | (b) You must cause any modified files to carry prominent notices 1855 | stating that You changed the files; and 1856 | 1857 | (c) You must retain, in the Source form of any Derivative Works 1858 | that You distribute, all copyright, patent, trademark, and 1859 | attribution notices from the Source form of the Work, 1860 | excluding those notices that do not pertain to any part of 1861 | the Derivative Works; and 1862 | 1863 | (d) If the Work includes a "NOTICE" text file as part of its 1864 | distribution, then any Derivative Works that You distribute must 1865 | include a readable copy of the attribution notices contained 1866 | within such NOTICE file, excluding those notices that do not 1867 | pertain to any part of the Derivative Works, in at least one 1868 | of the following places: within a NOTICE text file distributed 1869 | as part of the Derivative Works; within the Source form or 1870 | documentation, if provided along with the Derivative Works; or, 1871 | within a display generated by the Derivative Works, if and 1872 | wherever such third-party notices normally appear. The contents 1873 | of the NOTICE file are for informational purposes only and 1874 | do not modify the License. You may add Your own attribution 1875 | notices within Derivative Works that You distribute, alongside 1876 | or as an addendum to the NOTICE text from the Work, provided 1877 | that such additional attribution notices cannot be construed 1878 | as modifying the License. 1879 | 1880 | You may add Your own copyright statement to Your modifications and 1881 | may provide additional or different license terms and conditions 1882 | for use, reproduction, or distribution of Your modifications, or 1883 | for any such Derivative Works as a whole, provided Your use, 1884 | reproduction, and distribution of the Work otherwise complies with 1885 | the conditions stated in this License. 1886 | 1887 | 5. Submission of Contributions. Unless You explicitly state otherwise, 1888 | any Contribution intentionally submitted for inclusion in the Work 1889 | by You to the Licensor shall be under the terms and conditions of 1890 | this License, without any additional terms or conditions. 1891 | Notwithstanding the above, nothing herein shall supersede or modify 1892 | the terms of any separate license agreement you may have executed 1893 | with Licensor regarding such Contributions. 1894 | 1895 | 6. Trademarks. This License does not grant permission to use the trade 1896 | names, trademarks, service marks, or product names of the Licensor, 1897 | except as required for reasonable and customary use in describing the 1898 | origin of the Work and reproducing the content of the NOTICE file. 1899 | 1900 | 7. Disclaimer of Warranty. Unless required by applicable law or 1901 | agreed to in writing, Licensor provides the Work (and each 1902 | Contributor provides its Contributions) on an "AS IS" BASIS, 1903 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1904 | implied, including, without limitation, any warranties or conditions 1905 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 1906 | PARTICULAR PURPOSE. You are solely responsible for determining the 1907 | appropriateness of using or redistributing the Work and assume any 1908 | risks associated with Your exercise of permissions under this License. 1909 | 1910 | 8. Limitation of Liability. In no event and under no legal theory, 1911 | whether in tort (including negligence), contract, or otherwise, 1912 | unless required by applicable law (such as deliberate and grossly 1913 | negligent acts) or agreed to in writing, shall any Contributor be 1914 | liable to You for damages, including any direct, indirect, special, 1915 | incidental, or consequential damages of any character arising as a 1916 | result of this License or out of the use or inability to use the 1917 | Work (including but not limited to damages for loss of goodwill, 1918 | work stoppage, computer failure or malfunction, or any and all 1919 | other commercial damages or losses), even if such Contributor 1920 | has been advised of the possibility of such damages. 1921 | 1922 | 9. Accepting Warranty or Additional Liability. While redistributing 1923 | the Work or Derivative Works thereof, You may choose to offer, 1924 | and charge a fee for, acceptance of support, warranty, indemnity, 1925 | or other liability obligations and/or rights consistent with this 1926 | License. However, in accepting such obligations, You may act only 1927 | on Your own behalf and on Your sole responsibility, not on behalf 1928 | of any other Contributor, and only if You agree to indemnify, 1929 | defend, and hold each Contributor harmless for any liability 1930 | incurred by, or claims asserted against, such Contributor by reason 1931 | of your accepting any such warranty or additional liability. 1932 | 1933 | END OF TERMS AND CONDITIONS 1934 | 1935 | APPENDIX: How to apply the Apache License to your work. 1936 | 1937 | To apply the Apache License to your work, attach the following 1938 | boilerplate notice, with the fields enclosed by brackets "[]" 1939 | replaced with your own identifying information. (Don't include 1940 | the brackets!) The text should be enclosed in the appropriate 1941 | comment syntax for the file format. We also recommend that a 1942 | file or class name and description of purpose be included on the 1943 | same "printed page" as the copyright notice for easier 1944 | identification within third-party archives. 1945 | 1946 | Copyright [yyyy] [name of copyright owner] 1947 | 1948 | Licensed under the Apache License, Version 2.0 (the "License"); 1949 | you may not use this file except in compliance with the License. 1950 | You may obtain a copy of the License at 1951 | 1952 | http://www.apache.org/licenses/LICENSE-2.0 1953 | 1954 | Unless required by applicable law or agreed to in writing, software 1955 | distributed under the License is distributed on an "AS IS" BASIS, 1956 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1957 | See the License for the specific language governing permissions and 1958 | limitations under the License. 1959 | 1960 | ================================================================ 1961 | 1962 | google.golang.org/genproto 1963 | https://google.golang.org/genproto 1964 | ---------------------------------------------------------------- 1965 | 1966 | Apache License 1967 | Version 2.0, January 2004 1968 | http://www.apache.org/licenses/ 1969 | 1970 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1971 | 1972 | 1. Definitions. 1973 | 1974 | "License" shall mean the terms and conditions for use, reproduction, 1975 | and distribution as defined by Sections 1 through 9 of this document. 1976 | 1977 | "Licensor" shall mean the copyright owner or entity authorized by 1978 | the copyright owner that is granting the License. 1979 | 1980 | "Legal Entity" shall mean the union of the acting entity and all 1981 | other entities that control, are controlled by, or are under common 1982 | control with that entity. For the purposes of this definition, 1983 | "control" means (i) the power, direct or indirect, to cause the 1984 | direction or management of such entity, whether by contract or 1985 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 1986 | outstanding shares, or (iii) beneficial ownership of such entity. 1987 | 1988 | "You" (or "Your") shall mean an individual or Legal Entity 1989 | exercising permissions granted by this License. 1990 | 1991 | "Source" form shall mean the preferred form for making modifications, 1992 | including but not limited to software source code, documentation 1993 | source, and configuration files. 1994 | 1995 | "Object" form shall mean any form resulting from mechanical 1996 | transformation or translation of a Source form, including but 1997 | not limited to compiled object code, generated documentation, 1998 | and conversions to other media types. 1999 | 2000 | "Work" shall mean the work of authorship, whether in Source or 2001 | Object form, made available under the License, as indicated by a 2002 | copyright notice that is included in or attached to the work 2003 | (an example is provided in the Appendix below). 2004 | 2005 | "Derivative Works" shall mean any work, whether in Source or Object 2006 | form, that is based on (or derived from) the Work and for which the 2007 | editorial revisions, annotations, elaborations, or other modifications 2008 | represent, as a whole, an original work of authorship. For the purposes 2009 | of this License, Derivative Works shall not include works that remain 2010 | separable from, or merely link (or bind by name) to the interfaces of, 2011 | the Work and Derivative Works thereof. 2012 | 2013 | "Contribution" shall mean any work of authorship, including 2014 | the original version of the Work and any modifications or additions 2015 | to that Work or Derivative Works thereof, that is intentionally 2016 | submitted to Licensor for inclusion in the Work by the copyright owner 2017 | or by an individual or Legal Entity authorized to submit on behalf of 2018 | the copyright owner. For the purposes of this definition, "submitted" 2019 | means any form of electronic, verbal, or written communication sent 2020 | to the Licensor or its representatives, including but not limited to 2021 | communication on electronic mailing lists, source code control systems, 2022 | and issue tracking systems that are managed by, or on behalf of, the 2023 | Licensor for the purpose of discussing and improving the Work, but 2024 | excluding communication that is conspicuously marked or otherwise 2025 | designated in writing by the copyright owner as "Not a Contribution." 2026 | 2027 | "Contributor" shall mean Licensor and any individual or Legal Entity 2028 | on behalf of whom a Contribution has been received by Licensor and 2029 | subsequently incorporated within the Work. 2030 | 2031 | 2. Grant of Copyright License. Subject to the terms and conditions of 2032 | this License, each Contributor hereby grants to You a perpetual, 2033 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 2034 | copyright license to reproduce, prepare Derivative Works of, 2035 | publicly display, publicly perform, sublicense, and distribute the 2036 | Work and such Derivative Works in Source or Object form. 2037 | 2038 | 3. Grant of Patent License. Subject to the terms and conditions of 2039 | this License, each Contributor hereby grants to You a perpetual, 2040 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 2041 | (except as stated in this section) patent license to make, have made, 2042 | use, offer to sell, sell, import, and otherwise transfer the Work, 2043 | where such license applies only to those patent claims licensable 2044 | by such Contributor that are necessarily infringed by their 2045 | Contribution(s) alone or by combination of their Contribution(s) 2046 | with the Work to which such Contribution(s) was submitted. If You 2047 | institute patent litigation against any entity (including a 2048 | cross-claim or counterclaim in a lawsuit) alleging that the Work 2049 | or a Contribution incorporated within the Work constitutes direct 2050 | or contributory patent infringement, then any patent licenses 2051 | granted to You under this License for that Work shall terminate 2052 | as of the date such litigation is filed. 2053 | 2054 | 4. Redistribution. You may reproduce and distribute copies of the 2055 | Work or Derivative Works thereof in any medium, with or without 2056 | modifications, and in Source or Object form, provided that You 2057 | meet the following conditions: 2058 | 2059 | (a) You must give any other recipients of the Work or 2060 | Derivative Works a copy of this License; and 2061 | 2062 | (b) You must cause any modified files to carry prominent notices 2063 | stating that You changed the files; and 2064 | 2065 | (c) You must retain, in the Source form of any Derivative Works 2066 | that You distribute, all copyright, patent, trademark, and 2067 | attribution notices from the Source form of the Work, 2068 | excluding those notices that do not pertain to any part of 2069 | the Derivative Works; and 2070 | 2071 | (d) If the Work includes a "NOTICE" text file as part of its 2072 | distribution, then any Derivative Works that You distribute must 2073 | include a readable copy of the attribution notices contained 2074 | within such NOTICE file, excluding those notices that do not 2075 | pertain to any part of the Derivative Works, in at least one 2076 | of the following places: within a NOTICE text file distributed 2077 | as part of the Derivative Works; within the Source form or 2078 | documentation, if provided along with the Derivative Works; or, 2079 | within a display generated by the Derivative Works, if and 2080 | wherever such third-party notices normally appear. The contents 2081 | of the NOTICE file are for informational purposes only and 2082 | do not modify the License. You may add Your own attribution 2083 | notices within Derivative Works that You distribute, alongside 2084 | or as an addendum to the NOTICE text from the Work, provided 2085 | that such additional attribution notices cannot be construed 2086 | as modifying the License. 2087 | 2088 | You may add Your own copyright statement to Your modifications and 2089 | may provide additional or different license terms and conditions 2090 | for use, reproduction, or distribution of Your modifications, or 2091 | for any such Derivative Works as a whole, provided Your use, 2092 | reproduction, and distribution of the Work otherwise complies with 2093 | the conditions stated in this License. 2094 | 2095 | 5. Submission of Contributions. Unless You explicitly state otherwise, 2096 | any Contribution intentionally submitted for inclusion in the Work 2097 | by You to the Licensor shall be under the terms and conditions of 2098 | this License, without any additional terms or conditions. 2099 | Notwithstanding the above, nothing herein shall supersede or modify 2100 | the terms of any separate license agreement you may have executed 2101 | with Licensor regarding such Contributions. 2102 | 2103 | 6. Trademarks. This License does not grant permission to use the trade 2104 | names, trademarks, service marks, or product names of the Licensor, 2105 | except as required for reasonable and customary use in describing the 2106 | origin of the Work and reproducing the content of the NOTICE file. 2107 | 2108 | 7. Disclaimer of Warranty. Unless required by applicable law or 2109 | agreed to in writing, Licensor provides the Work (and each 2110 | Contributor provides its Contributions) on an "AS IS" BASIS, 2111 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 2112 | implied, including, without limitation, any warranties or conditions 2113 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 2114 | PARTICULAR PURPOSE. You are solely responsible for determining the 2115 | appropriateness of using or redistributing the Work and assume any 2116 | risks associated with Your exercise of permissions under this License. 2117 | 2118 | 8. Limitation of Liability. In no event and under no legal theory, 2119 | whether in tort (including negligence), contract, or otherwise, 2120 | unless required by applicable law (such as deliberate and grossly 2121 | negligent acts) or agreed to in writing, shall any Contributor be 2122 | liable to You for damages, including any direct, indirect, special, 2123 | incidental, or consequential damages of any character arising as a 2124 | result of this License or out of the use or inability to use the 2125 | Work (including but not limited to damages for loss of goodwill, 2126 | work stoppage, computer failure or malfunction, or any and all 2127 | other commercial damages or losses), even if such Contributor 2128 | has been advised of the possibility of such damages. 2129 | 2130 | 9. Accepting Warranty or Additional Liability. While redistributing 2131 | the Work or Derivative Works thereof, You may choose to offer, 2132 | and charge a fee for, acceptance of support, warranty, indemnity, 2133 | or other liability obligations and/or rights consistent with this 2134 | License. However, in accepting such obligations, You may act only 2135 | on Your own behalf and on Your sole responsibility, not on behalf 2136 | of any other Contributor, and only if You agree to indemnify, 2137 | defend, and hold each Contributor harmless for any liability 2138 | incurred by, or claims asserted against, such Contributor by reason 2139 | of your accepting any such warranty or additional liability. 2140 | 2141 | END OF TERMS AND CONDITIONS 2142 | 2143 | APPENDIX: How to apply the Apache License to your work. 2144 | 2145 | To apply the Apache License to your work, attach the following 2146 | boilerplate notice, with the fields enclosed by brackets "[]" 2147 | replaced with your own identifying information. (Don't include 2148 | the brackets!) The text should be enclosed in the appropriate 2149 | comment syntax for the file format. We also recommend that a 2150 | file or class name and description of purpose be included on the 2151 | same "printed page" as the copyright notice for easier 2152 | identification within third-party archives. 2153 | 2154 | Copyright [yyyy] [name of copyright owner] 2155 | 2156 | Licensed under the Apache License, Version 2.0 (the "License"); 2157 | you may not use this file except in compliance with the License. 2158 | You may obtain a copy of the License at 2159 | 2160 | http://www.apache.org/licenses/LICENSE-2.0 2161 | 2162 | Unless required by applicable law or agreed to in writing, software 2163 | distributed under the License is distributed on an "AS IS" BASIS, 2164 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2165 | See the License for the specific language governing permissions and 2166 | limitations under the License. 2167 | 2168 | ================================================================ 2169 | 2170 | google.golang.org/grpc 2171 | https://google.golang.org/grpc 2172 | ---------------------------------------------------------------- 2173 | 2174 | Apache License 2175 | Version 2.0, January 2004 2176 | http://www.apache.org/licenses/ 2177 | 2178 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 2179 | 2180 | 1. Definitions. 2181 | 2182 | "License" shall mean the terms and conditions for use, reproduction, 2183 | and distribution as defined by Sections 1 through 9 of this document. 2184 | 2185 | "Licensor" shall mean the copyright owner or entity authorized by 2186 | the copyright owner that is granting the License. 2187 | 2188 | "Legal Entity" shall mean the union of the acting entity and all 2189 | other entities that control, are controlled by, or are under common 2190 | control with that entity. For the purposes of this definition, 2191 | "control" means (i) the power, direct or indirect, to cause the 2192 | direction or management of such entity, whether by contract or 2193 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 2194 | outstanding shares, or (iii) beneficial ownership of such entity. 2195 | 2196 | "You" (or "Your") shall mean an individual or Legal Entity 2197 | exercising permissions granted by this License. 2198 | 2199 | "Source" form shall mean the preferred form for making modifications, 2200 | including but not limited to software source code, documentation 2201 | source, and configuration files. 2202 | 2203 | "Object" form shall mean any form resulting from mechanical 2204 | transformation or translation of a Source form, including but 2205 | not limited to compiled object code, generated documentation, 2206 | and conversions to other media types. 2207 | 2208 | "Work" shall mean the work of authorship, whether in Source or 2209 | Object form, made available under the License, as indicated by a 2210 | copyright notice that is included in or attached to the work 2211 | (an example is provided in the Appendix below). 2212 | 2213 | "Derivative Works" shall mean any work, whether in Source or Object 2214 | form, that is based on (or derived from) the Work and for which the 2215 | editorial revisions, annotations, elaborations, or other modifications 2216 | represent, as a whole, an original work of authorship. For the purposes 2217 | of this License, Derivative Works shall not include works that remain 2218 | separable from, or merely link (or bind by name) to the interfaces of, 2219 | the Work and Derivative Works thereof. 2220 | 2221 | "Contribution" shall mean any work of authorship, including 2222 | the original version of the Work and any modifications or additions 2223 | to that Work or Derivative Works thereof, that is intentionally 2224 | submitted to Licensor for inclusion in the Work by the copyright owner 2225 | or by an individual or Legal Entity authorized to submit on behalf of 2226 | the copyright owner. For the purposes of this definition, "submitted" 2227 | means any form of electronic, verbal, or written communication sent 2228 | to the Licensor or its representatives, including but not limited to 2229 | communication on electronic mailing lists, source code control systems, 2230 | and issue tracking systems that are managed by, or on behalf of, the 2231 | Licensor for the purpose of discussing and improving the Work, but 2232 | excluding communication that is conspicuously marked or otherwise 2233 | designated in writing by the copyright owner as "Not a Contribution." 2234 | 2235 | "Contributor" shall mean Licensor and any individual or Legal Entity 2236 | on behalf of whom a Contribution has been received by Licensor and 2237 | subsequently incorporated within the Work. 2238 | 2239 | 2. Grant of Copyright License. Subject to the terms and conditions of 2240 | this License, each Contributor hereby grants to You a perpetual, 2241 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 2242 | copyright license to reproduce, prepare Derivative Works of, 2243 | publicly display, publicly perform, sublicense, and distribute the 2244 | Work and such Derivative Works in Source or Object form. 2245 | 2246 | 3. Grant of Patent License. Subject to the terms and conditions of 2247 | this License, each Contributor hereby grants to You a perpetual, 2248 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 2249 | (except as stated in this section) patent license to make, have made, 2250 | use, offer to sell, sell, import, and otherwise transfer the Work, 2251 | where such license applies only to those patent claims licensable 2252 | by such Contributor that are necessarily infringed by their 2253 | Contribution(s) alone or by combination of their Contribution(s) 2254 | with the Work to which such Contribution(s) was submitted. If You 2255 | institute patent litigation against any entity (including a 2256 | cross-claim or counterclaim in a lawsuit) alleging that the Work 2257 | or a Contribution incorporated within the Work constitutes direct 2258 | or contributory patent infringement, then any patent licenses 2259 | granted to You under this License for that Work shall terminate 2260 | as of the date such litigation is filed. 2261 | 2262 | 4. Redistribution. You may reproduce and distribute copies of the 2263 | Work or Derivative Works thereof in any medium, with or without 2264 | modifications, and in Source or Object form, provided that You 2265 | meet the following conditions: 2266 | 2267 | (a) You must give any other recipients of the Work or 2268 | Derivative Works a copy of this License; and 2269 | 2270 | (b) You must cause any modified files to carry prominent notices 2271 | stating that You changed the files; and 2272 | 2273 | (c) You must retain, in the Source form of any Derivative Works 2274 | that You distribute, all copyright, patent, trademark, and 2275 | attribution notices from the Source form of the Work, 2276 | excluding those notices that do not pertain to any part of 2277 | the Derivative Works; and 2278 | 2279 | (d) If the Work includes a "NOTICE" text file as part of its 2280 | distribution, then any Derivative Works that You distribute must 2281 | include a readable copy of the attribution notices contained 2282 | within such NOTICE file, excluding those notices that do not 2283 | pertain to any part of the Derivative Works, in at least one 2284 | of the following places: within a NOTICE text file distributed 2285 | as part of the Derivative Works; within the Source form or 2286 | documentation, if provided along with the Derivative Works; or, 2287 | within a display generated by the Derivative Works, if and 2288 | wherever such third-party notices normally appear. The contents 2289 | of the NOTICE file are for informational purposes only and 2290 | do not modify the License. You may add Your own attribution 2291 | notices within Derivative Works that You distribute, alongside 2292 | or as an addendum to the NOTICE text from the Work, provided 2293 | that such additional attribution notices cannot be construed 2294 | as modifying the License. 2295 | 2296 | You may add Your own copyright statement to Your modifications and 2297 | may provide additional or different license terms and conditions 2298 | for use, reproduction, or distribution of Your modifications, or 2299 | for any such Derivative Works as a whole, provided Your use, 2300 | reproduction, and distribution of the Work otherwise complies with 2301 | the conditions stated in this License. 2302 | 2303 | 5. Submission of Contributions. Unless You explicitly state otherwise, 2304 | any Contribution intentionally submitted for inclusion in the Work 2305 | by You to the Licensor shall be under the terms and conditions of 2306 | this License, without any additional terms or conditions. 2307 | Notwithstanding the above, nothing herein shall supersede or modify 2308 | the terms of any separate license agreement you may have executed 2309 | with Licensor regarding such Contributions. 2310 | 2311 | 6. Trademarks. This License does not grant permission to use the trade 2312 | names, trademarks, service marks, or product names of the Licensor, 2313 | except as required for reasonable and customary use in describing the 2314 | origin of the Work and reproducing the content of the NOTICE file. 2315 | 2316 | 7. Disclaimer of Warranty. Unless required by applicable law or 2317 | agreed to in writing, Licensor provides the Work (and each 2318 | Contributor provides its Contributions) on an "AS IS" BASIS, 2319 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 2320 | implied, including, without limitation, any warranties or conditions 2321 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 2322 | PARTICULAR PURPOSE. You are solely responsible for determining the 2323 | appropriateness of using or redistributing the Work and assume any 2324 | risks associated with Your exercise of permissions under this License. 2325 | 2326 | 8. Limitation of Liability. In no event and under no legal theory, 2327 | whether in tort (including negligence), contract, or otherwise, 2328 | unless required by applicable law (such as deliberate and grossly 2329 | negligent acts) or agreed to in writing, shall any Contributor be 2330 | liable to You for damages, including any direct, indirect, special, 2331 | incidental, or consequential damages of any character arising as a 2332 | result of this License or out of the use or inability to use the 2333 | Work (including but not limited to damages for loss of goodwill, 2334 | work stoppage, computer failure or malfunction, or any and all 2335 | other commercial damages or losses), even if such Contributor 2336 | has been advised of the possibility of such damages. 2337 | 2338 | 9. Accepting Warranty or Additional Liability. While redistributing 2339 | the Work or Derivative Works thereof, You may choose to offer, 2340 | and charge a fee for, acceptance of support, warranty, indemnity, 2341 | or other liability obligations and/or rights consistent with this 2342 | License. However, in accepting such obligations, You may act only 2343 | on Your own behalf and on Your sole responsibility, not on behalf 2344 | of any other Contributor, and only if You agree to indemnify, 2345 | defend, and hold each Contributor harmless for any liability 2346 | incurred by, or claims asserted against, such Contributor by reason 2347 | of your accepting any such warranty or additional liability. 2348 | 2349 | END OF TERMS AND CONDITIONS 2350 | 2351 | APPENDIX: How to apply the Apache License to your work. 2352 | 2353 | To apply the Apache License to your work, attach the following 2354 | boilerplate notice, with the fields enclosed by brackets "[]" 2355 | replaced with your own identifying information. (Don't include 2356 | the brackets!) The text should be enclosed in the appropriate 2357 | comment syntax for the file format. We also recommend that a 2358 | file or class name and description of purpose be included on the 2359 | same "printed page" as the copyright notice for easier 2360 | identification within third-party archives. 2361 | 2362 | Copyright [yyyy] [name of copyright owner] 2363 | 2364 | Licensed under the Apache License, Version 2.0 (the "License"); 2365 | you may not use this file except in compliance with the License. 2366 | You may obtain a copy of the License at 2367 | 2368 | http://www.apache.org/licenses/LICENSE-2.0 2369 | 2370 | Unless required by applicable law or agreed to in writing, software 2371 | distributed under the License is distributed on an "AS IS" BASIS, 2372 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2373 | See the License for the specific language governing permissions and 2374 | limitations under the License. 2375 | 2376 | ================================================================ 2377 | 2378 | --------------------------------------------------------------------------------