Documentation ¶
Index ¶
- Variables
- type AcmeAccount
- type AcmeResource
- type AcmeUser
- type Application
- type ApplicationFlags
- type AuthorizationMiddleware
- type AuthorizedUser
- type AutocertStorage
- type AutoupdateService
- type CertificateDesc
- type CertificateIssueService
- type CertificateIssuer
- type CertificateManager
- type CertificateRepository
- type CertificateService
- type ClientScanner
- type Command
- type Component
- type ConfigRepository
- type ControlClient
- type CoreScanner
- type DNSProvider
- type DNSProviderClient
- type DNSRecord
- type DynDNSService
- type FlagSetRegistrar
- type IssuedCertificate
- type JobInfo
- type JobService
- type Mail
- type MailService
- type NatService
- type NodeService
- type Page
- type Record
- type ResourceService
- type Server
- type ServerScanner
- type StorageConsoleStream
- type StorageService
- type SystemEnvironmentPropertyResolver
- type Whois
- type WhoisService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogClass = reflect.TypeOf((*zap.Logger)(nil)) // *zap.Logger LumberjackClass = reflect.TypeOf((*lumberjack.Logger)(nil)) // *lumberjack.Logger FileSystemClass = reflect.TypeOf((*http.FileSystem)(nil)).Elem() // http.FileSystem FlagSetClass = reflect.TypeOf((*flag.FlagSet)(nil)) // *flag.FlagSet )
View Source
var ( TlsConfigClass = reflect.TypeOf((*tls.Config)(nil)) // *tls.Config AutocertManagerClass = reflect.TypeOf((*autocert.Manager)(nil)) // *autocert.Manager GrpcServerClass = reflect.TypeOf((*grpc.Server)(nil)) // *grpc.Server HealthCheckerClass = reflect.TypeOf((*health.Server)(nil)) // *health.Server HttpServerClass = reflect.TypeOf((*http.Server)(nil)) // *http.Server )
View Source
var ApplicationClass = reflect.TypeOf((*Application)(nil)).Elem()
View Source
var ApplicationFlagsClass = reflect.TypeOf((*ApplicationFlags)(nil)).Elem()
View Source
var AuthenticationServiceClass = reflect.TypeOf((*AuthorizationMiddleware)(nil)).Elem()
View Source
var AutocertStorageClass = reflect.TypeOf((*AutocertStorage)(nil)).Elem()
View Source
var AutoupdateServiceClass = reflect.TypeOf((*AutoupdateService)(nil)).Elem()
View Source
var CertificateIssuerClass = reflect.TypeOf((*CertificateIssuer)(nil)).Elem()
View Source
var CertificateIssuerServiceClass = reflect.TypeOf((*CertificateIssueService)(nil)).Elem()
View Source
var CertificateManagerClass = reflect.TypeOf((*CertificateManager)(nil)).Elem()
View Source
var CertificateRepositoryClass = reflect.TypeOf((*CertificateRepository)(nil)).Elem()
View Source
var CertificateServiceClass = reflect.TypeOf((*CertificateService)(nil)).Elem()
View Source
var ClientScannerClass = reflect.TypeOf((*ClientScanner)(nil)).Elem()
View Source
var CommandClass = reflect.TypeOf((*Command)(nil)).Elem()
View Source
var ComponentClass = reflect.TypeOf((*Component)(nil)).Elem()
* Generic component class that has a name
View Source
var ConfigRepositoryClass = reflect.TypeOf((*ConfigRepository)(nil)).Elem()
View Source
var ControlClientClass = reflect.TypeOf((*ControlClient)(nil)).Elem()
View Source
var CoreScannerClass = reflect.TypeOf((*CoreScanner)(nil)).Elem()
View Source
var DNSProviderClass = reflect.TypeOf((*DNSProvider)(nil)).Elem()
View Source
var DNSProviderClientClass = reflect.TypeOf((*DNSProviderClient)(nil)).Elem()
View Source
var DynDNSServiceClass = reflect.TypeOf((*DynDNSService)(nil)).Elem()
View Source
var FlagSetRegistrarClass = reflect.TypeOf((*FlagSetRegistrar)(nil)).Elem()
View Source
var GrpcClientClass = reflect.TypeOf((*grpc.ClientConn)(nil)) // *grpc.ClientConn
View Source
var JobServiceClass = reflect.TypeOf((*JobService)(nil)).Elem()
View Source
var MailServiceClass = reflect.TypeOf((*MailService)(nil)).Elem()
View Source
var NatServiceClass = reflect.TypeOf((*NatService)(nil)).Elem()
View Source
var NodeServiceClass = reflect.TypeOf((*NodeService)(nil)).Elem()
View Source
var PageClass = reflect.TypeOf((*Page)(nil)).Elem()
View Source
var ResourceServiceClass = reflect.TypeOf((*ResourceService)(nil)).Elem()
View Source
var ServerClass = reflect.TypeOf((*Server)(nil)).Elem()
View Source
var ServerScannerClass = reflect.TypeOf((*ServerScanner)(nil)).Elem()
View Source
var StorageServiceClass = reflect.TypeOf((*StorageService)(nil)).Elem()
View Source
var SystemEnvironmentPropertyResolverClass = reflect.TypeOf((*SystemEnvironmentPropertyResolver)(nil)).Elem()
View Source
var WhoisServiceClass = reflect.TypeOf((*WhoisService)(nil)).Elem()
Functions ¶
This section is empty.
Types ¶
type AcmeAccount ¶
type AcmeAccount struct { Status string `json:"status,omitempty"` Contact []string `json:"contact,omitempty"` TermsOfServiceAgreed bool `json:"termsOfServiceAgreed,omitempty"` Orders string `json:"orders,omitempty"` OnlyReturnExisting bool `json:"onlyReturnExisting,omitempty"` ExternalAccountBinding json.RawMessage `json:"externalAccountBinding,omitempty"` }
type AcmeResource ¶
type AcmeResource struct { Body AcmeAccount `json:"body,omitempty"` URI string `json:"uri,omitempty"` }
type AcmeUser ¶
type AcmeUser struct { Email string Registration *AcmeResource PrivateKey crypto.PrivateKey }
type Application ¶
type Application interface { context.Context gluten.InitializingBean gluten.NamedBean Component /** Add beans to application context */ AppendBeans(beans ...interface{}) /** Gets application name, represents lower case normalized executable name */ Name() string /** Gets application version at the time of compilation */ Version() string /** Gets application build at the time of compilation */ Build() string /** Gets application runtime profile, could be: dev, qa, prod and etc. */ Profile() string /** Checks if application running in dev mode */ IsDev() bool /** Gets application binary name, used on startup, could be different with application name */ Executable() string /** Gets home directory of the application, usually parent directory of binary folder where executable is running, not current directory */ ApplicationDir() string /** Run application with command line arguments */ Run(args []string) error /** Indicator if application is active and not in shutting down mode */ Active() bool /** Sets the flag that application is in shutting down mode then notify all go routines by ShutdownChannel then notify signal channel with interrupt signal Additionally sets the flag that application is going to be restarted after shutdown */ Shutdown(restart bool) /** Indicator if application needs to be restarted by autoupdate or remote command after shutdown */ Restarting() bool }
*
Application is the base entry point class for golang application.
type ApplicationFlags ¶
type AuthorizationMiddleware ¶
type AuthorizationMiddleware interface { gluten.InitializingBean Authenticate(ctx context.Context) (context.Context, error) GetUser(ctx context.Context) (*AuthorizedUser, bool) HasUserRole(ctx context.Context, role string) bool UserContext(ctx context.Context, name string) (string, bool) GenerateToken(user *AuthorizedUser) (string, error) ParseToken(token string) (*AuthorizedUser, error) InvalidateToken(token string) }
type AuthorizedUser ¶
type AutocertStorage ¶
type AutoupdateService ¶
type AutoupdateService interface { gluten.InitializingBean gluten.DisposableBean Freeze(jobName string) int64 Unfreeze(handle int64) FreezeJobs() map[int64]string }
type CertificateDesc ¶
type CertificateIssueService ¶
type CertificateIssueService interface { LoadCertificateDesc() (*CertificateDesc, error) CreateIssuer(cn string, info *CertificateDesc) (CertificateIssuer, error) LoadIssuer(*saucepb.SelfSigner) (CertificateIssuer, error) LocalIPAddresses(addLocalhost bool) ([]net.IP, error) }
type CertificateIssuer ¶
type CertificateIssuer interface { Parent() (CertificateIssuer, bool) Certificate() IssuedCertificate IssueInterCert(cn string) (CertificateIssuer, error) IssueClientCert(cn string, password string) (cert IssuedCertificate, pfxData []byte, err error) IssueServerCert(cn string, domains []string, ipAddresses []net.IP) (IssuedCertificate, error) }
type CertificateManager ¶
type CertificateManager interface { gluten.InitializingBean gluten.DisposableBean GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) InvalidateCache(domain string) ListActive() map[string]error ListRenewal() map[string]time.Time ListUnknown() map[string]time.Time ExecuteCommand(cmd string, args []string) (string, error) }
type CertificateRepository ¶
type CertificateRepository interface { gluten.DisposableBean /** Self Signer CRUID */ SaveSelfSigner(self *saucepb.SelfSigner) error FindSelfSigner(name string) (*saucepb.SelfSigner, error) ListSelfSigners(prefix string, cb func(*saucepb.SelfSigner) bool) error DeleteSelfSigner(name string) error /** Acme Account CRUID */ SaveAccount(account *saucepb.AcmeAccount) error FindAccount(email string) (*saucepb.AcmeAccount, error) ListAccounts(prefix string, cb func(*saucepb.AcmeAccount) bool) error DeleteAccount(email string) error SaveZone(zone *saucepb.Zone) error FindZone(zone string) (*saucepb.Zone, error) ListZones(prefix string, cb func(*saucepb.Zone) bool) error DeleteZone(zone string) error Watch(ctx context.Context, cb func(zone, event string) bool) (cancel context.CancelFunc, err error) Backend() fastfood.DataStore /** Sets backend using for storing certificates */ SetBackend(storage fastfood.DataStore) }
type CertificateService ¶
type CertificateService interface { gluten.InitializingBean CreateAcmeAccount(email string) error GetOrCreateAcmeUser(email string) (user *AcmeUser, err error) CreateSelfSigner(cn string, withInter bool) error RenewCertificate(zone string) error ExecuteCommand(cmd string, args []string) (string, error) IssueAcmeCertificate(entry *saucepb.Zone) (string, error) IssueSelfSignedCertificate(entry *saucepb.Zone) error }
type ClientScanner ¶
type ClientScanner interface {
ClientBeans() []interface{}
}
type ConfigRepository ¶
type ConfigRepository interface { gluten.DisposableBean gluten.PropertyResolver Get(key string) (string, error) EnumerateAll(prefix string, cb func(key, value string) bool) error Set(key, value string) error Watch(context context.Context, prefix string, cb func(key, value string) bool) (context.CancelFunc, error) Backend() fastfood.DataStore /** Sets backend using for storing properties */ SetBackend(storage fastfood.DataStore) }
type ControlClient ¶
type ControlClient interface { gluten.InitializingBean gluten.DisposableBean Status() (string, error) Shutdown(restart bool) (string, error) ConfigCommand(command string, args []string) (string, error) CertificateCommand(command string, args []string) (string, error) JobCommand(command string, args []string) (string, error) StorageCommand(command string, args []string) (string, error) StorageConsole(writer io.StringWriter, errWriter io.StringWriter) error }
type CoreScanner ¶
type CoreScanner interface {
/**
Gets core beans that will extend application beans, parent context.
*/
CoreBeans() []interface{}
}
*
Core scanner is using to find beans to create core context when application is already created.
type DNSProvider ¶
type DNSProviderClient ¶
type DNSRecord ¶
type DNSRecord struct { ID string `json:"id,omitempty"` Hostname string `json:"hostname,omitempty"` TTL int `json:"ttl,omitempty"` Type string `json:"type,omitempty"` Priority int `json:"priority,omitempty"` Value string `json:"value,omitempty"` }
DNSRecord DNS record representation.
type DynDNSService ¶
type FlagSetRegistrar ¶
type IssuedCertificate ¶
type JobService ¶
type MailService ¶
type NatService ¶
type NodeService ¶
type ResourceService ¶
type Server ¶
type Server interface { gluten.InitializingBean gluten.DisposableBean Bind() error Active() bool ListenAddress() net.Addr Serve() error Stop() }
type ServerScanner ¶
type ServerScanner interface {
ServerBeans() []interface{}
}
type StorageConsoleStream ¶
type StorageConsoleStream interface { Send(*saucepb.StorageConsoleResponse) error Recv() (*saucepb.StorageConsoleRequest, error) }
type StorageService ¶
type StorageService interface { gluten.InitializingBean Execute(name, query string, cb func(string) bool) error ExecuteCommand(cmd string, args []string) (string, error) Console(stream StorageConsoleStream) error LocalConsole(writer io.StringWriter, errWriter io.StringWriter) error }
Click to show internal directories.
Click to hide internal directories.