Versions in this module Expand all Collapse all v1 v1.2.1 Jun 19, 2020 v1.2.0 Mar 4, 2020 Changes in this version + const CharsetUTF8 + const ContentType + const TextPlain + var ErrAccessTokenRequestFailed = errors.New("Failed to fetch AccessToken") + var ErrCertNotFound = errors.New("Failed to fetch service cert") + var ErrContextClosed = errors.New("context Closed") + var ErrFailedToInitialize = errors.New("Failed to initialize a service") + var ErrInvalidCert = errors.New("Failed to parse service cert") + var ErrInvalidParameter = errors.New("Invalid parameter") + var ErrInvalidSetting = errors.New("Invalid config") + var ErrLoadPrivateKey = errors.New("PrivateKey does not exist") + var ErrRoleTokenRequestFailed = errors.New("Failed to fetch RoleToken") + var ErrTLSCertOrKeyNotFound = errors.New("Cert/Key path not found") + func NewTLSConfig(cfg config.TLS) (*tls.Config, error) + func NewX509CertPool(path string) (*x509.CertPool, error) + type AccessProvider func(ctx context.Context, domain string, role string, proxyForPrincipal string, ...) (*AccessTokenResponse, error) + type AccessService interface + GetAccessProvider func() AccessProvider + RefreshAccessTokenCache func(ctx context.Context) <-chan error + StartAccessUpdater func(context.Context) <-chan error + func NewAccessService(cfg config.Access, token ntokend.TokenProvider) (AccessService, error) + type AccessTokenResponse struct + AccessToken string + ExpiresIn int64 + IDToken string + RefreshToken string + Scope string + TokenType string + type Option func(*server) + func WithServerConfig(cfg config.Server) Option + func WithServerHandler(h http.Handler) Option + type RoleProvider func(ctx context.Context, domain string, role string, proxyForPrincipal string, ...) (*RoleToken, error) + type RoleService interface + GetRoleProvider func() RoleProvider + RefreshRoleTokenCache func(ctx context.Context) <-chan error + StartRoleUpdater func(context.Context) <-chan error + func NewRoleService(cfg config.Role, token ntokend.TokenProvider) (RoleService, error) + type RoleToken struct + ExpiryTime int64 + Token string + type Server interface + ListenAndServe func(context.Context) chan []error + func NewServer(opts ...Option) Server + type SvcCertProvider func() ([]byte, error) + type SvcCertService interface + GetSvcCertProvider func() SvcCertProvider + RefreshSvcCert func() ([]byte, error) + StartSvcCertUpdater func(context.Context) SvcCertService + func NewSvcCertService(cfg config.Config, token ntokend.TokenProvider) (SvcCertService, error) Other modules containing this package github.com/yahoojapan/athenz-client-sidecar/v2