// CreateNodalEvent create new nodal event // waiting ChannelID from context func (s *Service) CreateNodalEventWithThreadName( ctx context.Context, threadName string, threadID uuid.UUID, owners []uuid.UUID, creatorID uuid.UUID, ) (uuid.UUID, uuid.UUID, error) { if err := utils.ValidName(threadName); err != nil { return uuid.Nil, uuid.Nil, err } return s.createNodalEvent( ctx, threadName, threadID, owners, creatorID, []byte{}, ) }
func (s *Service) CreateChannelName( ctx context.Context, name string, userIDs []uuid.UUID, ) (uuid.UUID, uuid.UUID, error) { var channelID = uuid.NewV4() var rootThreadID = uuid.NewV4() var clientID = ClientIDFromContext(ctx) if err := utils.ValidName(name); err != nil { return uuid.Nil, uuid.Nil, err } return s.createChannel( ctx, clientID, channelID, rootThreadID, name, userIDs, ) }
func (s *Service) CreateNewBranchEventWithThreadName( ctx context.Context, threadName string, threadID uuid.UUID, relatedEventID uuid.UUID, // owners []uuid.UUID, creatorID uuid.UUID, data []byte, ) (uuid.UUID, uuid.UUID, error) { if err := utils.ValidName(threadName); err != nil { return uuid.Nil, uuid.Nil, err } return s.createNewBranchEvent( ctx, threadName, threadID, relatedEventID, owners, creatorID, data, ) }