Documentation ¶
Overview ¶
Package client implements endpoint client
Index ¶
- type Client
- type Option
- func WithAuthToken(authToken string) Option
- func WithCacheLifetime(lifetime time.Duration) Option
- func WithCacheSize(size int) Option
- func WithDIDWebHTTP(enable bool) Option
- func WithDisableProofCheck(disable bool) Option
- func WithHTTPClient(httpClient httpClient) Option
- func WithNamespace(namespace string) Option
- func WithPublicKeyFetcher(pkf verifiable.PublicKeyFetcher) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches configs, caching results in-memory.
func New ¶
func New(docLoader ld.DocumentLoader, casReader casReader, opts ...Option) (*Client, error)
New create new endpoint client.
func (*Client) GetEndpoint ¶
GetEndpoint fetches endpoints from domain, caching the value.
type Option ¶
type Option func(opts *Client)
Option is a config service instance option.
func WithCacheLifetime ¶ added in v0.1.3
WithCacheLifetime option defines the lifetime of an object in the cache.
func WithCacheSize ¶ added in v0.1.3
WithCacheSize option defines the cache size.
func WithDIDWebHTTP ¶ added in v1.0.0
WithDIDWebHTTP use did web http.
func WithDisableProofCheck ¶
WithDisableProofCheck disable proof check.
func WithHTTPClient ¶
func WithHTTPClient(httpClient httpClient) Option
WithHTTPClient option is for custom http client.
func WithNamespace ¶
WithNamespace option is for custom namespace.
func WithPublicKeyFetcher ¶ added in v1.0.0
func WithPublicKeyFetcher(pkf verifiable.PublicKeyFetcher) Option
WithPublicKeyFetcher sets the public key fetcher. If not set then the default fetcher is used.
Click to show internal directories.
Click to hide internal directories.