utils

package module
v0.0.0-...-3f838b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOutboundIP

func GetOutboundIP() net.IP

func GetRandomInt

func GetRandomInt(min int, max int) int

func HttpError

func HttpError(ctx *gin.Context, status int, err error)

func JsonString

func JsonString(jsonString string) string

func ParseInvitationUrl

func ParseInvitationUrl(invitationUrl string) ([]byte, error)

func PrettyJson

func PrettyJson(jsonString string) string

func SetLogLevelDebug

func SetLogLevelDebug(debugMode bool)

Types

type ControllerConfig

type ControllerConfig struct {
	// Common from json file
	AgentApiUrl string `json:"AgentApiUrl" validate:"required,url"`
	WalletType  string `json:"WalletType"`
	Debug       bool   `json:"Debug"`

	// Faber only from json file
	IssuerWebhookUrl string `json:"IssuerWebhookUrl" validate:"omitempty,url"`
	RevokeAfterIssue bool   `json:"RevokeAfterIssue"`
	PublicInvitation bool   `json:"PublicInvitation"`

	// Alice only from json file
	HolderWebhookUrl string `json:"HolderWebhookUrl" validate:"omitempty,url"`
	IssuerContUrl    string `json:"IssuerContUrl" validate:"omitempty,url"`
}

func (*ControllerConfig) ReadConfig

func (config *ControllerConfig) ReadConfig(fileName string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL