styx/utils/main.go

21 lines
355 B
Go
Raw Normal View History

package utils
import (
"github.com/jmoiron/jsonq"
"gitlab.dcso.lolcat/LABS/styx/models"
)
func ExtractCertFromStream(input jsonq.JsonQuery) (*models.CertStreamStruct, error) {
messageType, err := input.String("message_type")
if err != nil {
return nil, err
}
res := models.CertStreamStruct{
MessageType: messageType,
}
return &res, nil
}