Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2019 Dell 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. *
- @author: Tingyu Zeng, Dell ******************************************************************************
******************************************************************************
- Copyright 2019 Dell 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. *
- @author: Tingyu Zeng, Dell ******************************************************************************
******************************************************************************
- Copyright 2019 Dell 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. *
- @author: Tingyu Zeng, Dell ******************************************************************************
******************************************************************************
- Copyright 2019 Dell 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. *
- @author: Tingyu Zeng, Dell ******************************************************************************
******************************************************************************
- Copyright 2019 Dell 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. *
- @author: Tingyu Zeng, Dell ******************************************************************************
Index ¶
- Constants
- func Main(ctx context.Context, cancel context.CancelFunc, _ *mux.Router, _ chan<- bool)
- func NewRequestor(skipVerify bool, timeoutInSecond int, caCertPath string, ...) internal.HttpCaller
- type Bootstrap
- type CertError
- type CertInfo
- type CertUploadErrorType
- type Consumer
- type DataCollect
- type Item
- type JWTCred
- type KongACLPlugin
- type KongBasicAuthPlugin
- type KongConsumerOauth2
- type KongJWTClaims
- type KongOAuth2Plugin
- type KongOauth2Token
- type KongOuath2TokenRequest
- type KongRoute
- type KongService
- type KongServiceResponse
- type Resource
- type Service
- type UserTokenPair
Constants ¶
View Source
const ( ServicesPath = "services" RoutesPath = "routes" ConsumersPath = "consumers" CertificatesPath = "certificates" PluginsPath = "plugins" EdgeXKong = "edgex-kong" VaultToken = "X-Vault-Token" OAuth2GrantType = "client_credentials" OAuth2Scopes = "all" )
Variables ¶
This section is empty.
Functions ¶
func NewRequestor ¶
func NewRequestor( skipVerify bool, timeoutInSecond int, caCertPath string, lc logger.LoggingClient) internal.HttpCaller
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
func NewBootstrap ¶
type CertUploadErrorType ¶
type CertUploadErrorType int
const ( CertExisting CertUploadErrorType = 0 InternalError CertUploadErrorType = 1 // AddProxyRoutesEnv is the environment variable name for adding the additional Kong routes for app services AddProxyRoutesEnv = "ADD_PROXY_ROUTE" )
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer( name string, r internal.HttpCaller, lc logger.LoggingClient, configuration *config.ConfigurationStruct) Consumer
func (*Consumer) AssociateWithGroup ¶
func (*Consumer) CreateToken ¶
type DataCollect ¶
type DataCollect struct {
Section []Item `json:"data"`
}
type KongACLPlugin ¶
type KongBasicAuthPlugin ¶
type KongConsumerOauth2 ¶
type KongJWTClaims ¶
type KongJWTClaims struct { ISS string `json:"iss"` Acct string `json:"account"` jwt.StandardClaims }
type KongOAuth2Plugin ¶
type KongOAuth2Plugin struct { Name string `url:"name"` Scope string `url:"config.scopes"` MandatoryScope string `url:"config.mandatory_scope"` EnableClientCredentials string `url:"config.enable_client_credentials"` EnableGlobalCredentials string `url:"config.global_credentials"` TokenTTL int `url:"config.refresh_token_ttl"` }
type KongOauth2Token ¶
type KongOuath2TokenRequest ¶
type KongService ¶
type KongServiceResponse ¶
type KongServiceResponse struct { ID string `json:"id,omitempty"` CreatedAt uint64 `json:"created_at,omitempty"` UpdatedAt uint64 `json:"updated_at,omitempty"` ConnectTimeout int64 `json:"connect_timeout,omitempty"` Protocol string `json:"protocol,omitempty"` Host string `json:"host,omitempty"` Port uint64 `json:"port,omitempty"` Path string `json:"path,omitempty"` Name string `json:"name,omitempty"` Retries int64 `json:"retries,omitempty"` ReadTimeout int64 `json:"read_timeout,omitempty"` WriteTimeout int64 `json:"write_timeout,omitempty"` }
KongServiceResponse is the response from Kong when creating a service
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResource( name string, r internal.HttpCaller, kongProxyBaseUrl string, lc logger.LoggingClient) *Resource
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( r internal.HttpCaller, lc logger.LoggingClient, configuration *config.ConfigurationStruct) Service
func (*Service) CheckProxyServiceStatus ¶
func (*Service) CheckSecretServiceStatus ¶
func (*Service) Init ¶
func (s *Service) Init(cp bootstrapConfig.CertKeyPair) error
func (*Service) ResetProxy ¶
type UserTokenPair ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.