Documentation
¶
Index ¶
- Constants
- func AuthMiddleware(dataFetcher ...dataFetcher) gin.HandlerFunc
- func GetPolicyResult(name string, data interface{}, version string, predefinedId string) (any, error)
- func MetadataHandler(metadata Metadata) func(c *gin.Context)
- func PublishDidCommNotification(topic string, eventType messaging.RecordEventType, userId string, ...) error
- func PublishHistoryEvent(topic string, eventType messaging.RecordEventType, ...) error
- func SetLibConfig(c Config)
- type Config
- type Connector
- type DIDCommConnection
- type DIDCommNotification
- type EvaluateResult
- type EventBus
- type EventType
- type HttpClient
- type Message
- type Metadata
- type SdkError
- type StandardQueryParams
- type UserInfo
Constants ¶
View Source
const SignerTopic = "signer-topic"
View Source
const UserKey = "user"
View Source
const (
UserNotFound = "user not found"
)
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(dataFetcher ...dataFetcher) gin.HandlerFunc
func GetPolicyResult ¶
func MetadataHandler ¶
func PublishHistoryEvent ¶
func PublishHistoryEvent(topic string, eventType messaging.RecordEventType, record messaging.HistoryRecord) error
func SetLibConfig ¶
func SetLibConfig(c Config)
Types ¶
type Config ¶
type Config struct {
LogLevel string `default:"info"`
IsDev bool `default:"true"`
Name string
Tenant string
KeyCloak struct {
Url string
Login string
Password string
RealmName string
TokenTTL time.Duration `default:"250ns"`
}
Policy struct {
Url string
Repository string
Group string
ExpiresInSeconds int
}
Nats struct {
Url string
QueueGroup string
}
Crypto struct {
Namespace string
}
DIDComm struct {
Url string
}
}
type DIDCommConnection ¶
type DIDCommConnection struct {
RemoteDid string `json:"remoteDid"`
RoutingKey string `json:"routingKey"`
Protocol string `json:"protocol"`
Topic string `json:"topic"`
EventType string `json:"eventType"`
Properties map[string]string `json:"properties"`
RecipientDids []string `json:"recipientDids"`
Added time.Time `json:"added"`
Group string `json:"group"`
}
type DIDCommNotification ¶
type EvaluateResult ¶
type EventBus ¶
type EventBus interface {
Request(context.Context, string, event.Event) (*event.Event, error)
Reply(context.Context, string, func(context.Context, event.Event) (*event.Event, error)) error
Publish(context.Context, string, event.Event) error
Subscribe(context.Context, string, func(event.Event)) error
}
func NewEventBus ¶
func NewEventBus() EventBus
type Message ¶
type Message interface {
CreateKey(string, string, string) error
CreateToken(string, string, []byte) ([]byte, error)
}
func NewMessage ¶
type StandardQueryParams ¶
Click to show internal directories.
Click to hide internal directories.