21 lines
355 B
Go
21 lines
355 B
Go
|
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
|
||
|
|
||
|
}
|