github.com/anuvu/tyk@v2.9.0-beta9-dl-apic+incompatible/user/policy.go (about) 1 package user 2 3 import "gopkg.in/mgo.v2/bson" 4 5 type Policy struct { 6 MID bson.ObjectId `bson:"_id,omitempty" json:"_id"` 7 ID string `bson:"id,omitempty" json:"id"` 8 OrgID string `bson:"org_id" json:"org_id"` 9 Rate float64 `bson:"rate" json:"rate"` 10 Per float64 `bson:"per" json:"per"` 11 QuotaMax int64 `bson:"quota_max" json:"quota_max"` 12 QuotaRenewalRate int64 `bson:"quota_renewal_rate" json:"quota_renewal_rate"` 13 ThrottleInterval float64 `bson:"throttle_interval" json:"throttle_interval"` 14 ThrottleRetryLimit int `bson:"throttle_retry_limit" json:"throttle_retry_limit"` 15 AccessRights map[string]AccessDefinition `bson:"access_rights" json:"access_rights"` 16 HMACEnabled bool `bson:"hmac_enabled" json:"hmac_enabled"` 17 Active bool `bson:"active" json:"active"` 18 IsInactive bool `bson:"is_inactive" json:"is_inactive"` 19 Tags []string `bson:"tags" json:"tags"` 20 KeyExpiresIn int64 `bson:"key_expires_in" json:"key_expires_in"` 21 Partitions PolicyPartitions `bson:"partitions" json:"partitions"` 22 LastUpdated string `bson:"last_updated" json:"last_updated"` 23 } 24 25 type PolicyPartitions struct { 26 Quota bool `bson:"quota" json:"quota"` 27 RateLimit bool `bson:"rate_limit" json:"rate_limit"` 28 Acl bool `bson:"acl" json:"acl"` 29 PerAPI bool `bson:"per_api" json:"per_api"` 30 }