github.com/cs3org/reva/v2@v2.27.7/pkg/events/sciencemesh.go (about) 1 package events 2 3 import ( 4 "encoding/json" 5 6 user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" 7 types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" 8 ) 9 10 // ScienceMeshInviteTokenGenerated is emitted when a sciencemesh token is generated 11 type ScienceMeshInviteTokenGenerated struct { 12 Sharer *user.UserId 13 RecipientMail string 14 Token string 15 Description string 16 Expiration uint64 17 InviteLink string 18 Timestamp *types.Timestamp 19 } 20 21 // Unmarshal to fulfill unmarshaller interface 22 func (ScienceMeshInviteTokenGenerated) Unmarshal(v []byte) (interface{}, error) { 23 e := ScienceMeshInviteTokenGenerated{} 24 err := json.Unmarshal(v, &e) 25 return e, err 26 }