github.com/Kong/go-pdk@v0.11.0/entities/entities.go (about) 1 /* 2 Some struct definitons for Kong entities. 3 */ 4 package entities 5 6 type ServiceKey struct { 7 Id string `json:"id"` 8 } 9 10 type CertificateKey struct { 11 Id string `json:"id"` 12 } 13 14 type Route struct { 15 Id string `json:"id"` 16 CreatedAt int `json:"created_at"` 17 UpdatedAt int `json:"updated_at"` 18 Name string `json:"name"` 19 Protocols []string `json:"protocols"` 20 Methods []string `json:"methods"` 21 Hosts []string `json:"hosts"` 22 Paths []string `json:"paths"` 23 Headers []string `json:"headers"` 24 HTTPSRedirectStatusCode int `json:"https_redirect_status_code"` 25 RegexPriority int `json:"regex_priority"` 26 StripPath bool `json:"strip_path"` 27 PreserveHost bool `json:"preserve_host"` 28 SNIs []string `json:"snis"` 29 Sources []string `json:"sources"` 30 Destinations []string `json:"destinations"` 31 Tags []string `json:"tags"` 32 Service ServiceKey `json:"service"` 33 } 34 35 type Service struct { 36 Id string `json:"id"` 37 CreatedAt int `json:"created_at"` 38 UpdatedAt int `json:"updated_at"` 39 Name string `json:"name"` 40 Retries int `json:"retries"` 41 Protocol string `json:"protocol"` 42 Host string `json:"host"` 43 Port int `json:"port"` 44 Path string `json:"path"` 45 ConnectTimeout int `json:"connect_timeout"` 46 WriteTimeout int `json:"write_timeout"` 47 ReadTimeout int `json:"read_timeout"` 48 Tags []string `json:"tags"` 49 ClientCertificate CertificateKey `json:"client_certificate"` 50 } 51 52 type Consumer struct { 53 Id string `json:"id"` 54 CreatedAt int `json:"created_at"` 55 Username string `json:"username"` 56 CustomId string `json:"custom_id"` 57 Tags []string `json:"tags"` 58 }