blob: ba362bae3195f5c0f3d6082bf618e54be996c373 [file] [log] [blame]
/*
Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package common
type Attribute struct {
Name string `json:"name"`
Value string `json:"value"`
}
type VerifyAPIKeyRequest struct {
Key string `json:"apiKey"`
}
type VerifyAPIKeyResponse struct {
Token string `json:"token"`
}
type APIProduct struct {
APIResources []string `json:"apiResources"`
ApprovalType string `json:"approvalType"`
Attributes []Attribute `json:"attributes"`
CreatedAt int64 `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Description string `json:"description"`
DisplayName string `json:"displayName"`
Environments []string `json:"environments"`
LastModifiedAt int64 `json:"lastModifiedAt"`
LastModifiedBy string `json:"lastModifiedBy"`
Name string `json:"name"`
Proxies []string `json:"proxies"`
Quota string `json:"quota"`
QuotaInterval string `json:"quotaInterval"`
QuotaTimeUnit string `json:"quotaTimeUnit"`
Scopes []string `json:"scopes"`
}
type APIFaultMessage struct {
Fault APIFault `json:"fault"`
}
type APIFault struct {
FaultString string `json:"faultstring"`
Detail APIFaultDetail `json:"detail"`
}
type APIFaultDetail struct {
ErrorCode string `json:"errorcode"`
}