Documentation ¶
Index ¶
- type CommonAPI
- func (a *CommonAPI) AuthNew(ctx context.Context, payload *types.JWTPayload) (string, error)
- func (a *CommonAPI) AuthVerify(ctx context.Context, token string) (*types.JWTPayload, error)
- func (a *CommonAPI) Closing(context.Context) (<-chan struct{}, error)
- func (a *CommonAPI) Discover(ctx context.Context) (types.OpenRPCDocument, error)
- func (a *CommonAPI) LogAlerts(ctx context.Context) ([]alerting.Alert, error)
- func (a *CommonAPI) LogList(context.Context) ([]string, error)
- func (a *CommonAPI) LogSetLevel(ctx context.Context, subsystem, level string) error
- func (a *CommonAPI) Session(ctx context.Context) (uuid.UUID, error)
- func (a *CommonAPI) Shutdown(context.Context) error
- func (a *CommonAPI) Version(context.Context) (api.APIVersion, error)
- type SessionCallbackFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonAPI ¶
type CommonAPI struct { Alerting *alerting.Alerting APISecret *jwt.HMACSHA ShutdownChan dtypes.ShutdownChan }
CommonAPI api o
func NewCommonAPI ¶
func NewCommonAPI(lr repo.LockedRepo, secret *jwt.HMACSHA, shutdownChan dtypes.ShutdownChan) (CommonAPI, error)
NewCommonAPI initializes a new CommonAPI
func (*CommonAPI) AuthVerify ¶
AuthVerify verifies a JWT token and returns the permissions associated with it
func (*CommonAPI) LogSetLevel ¶
LogSetLevel sets the log level for a given subsystem
type SessionCallbackFunc ¶
SessionCallbackFunc will be called after node connection
Click to show internal directories.
Click to hide internal directories.