github.com/glide-im/glide@v1.6.0/internal/message_store_db/chan.go (about)

     1  package message_store_db
     2  
     3  import (
     4  	"github.com/glide-im/glide/pkg/messages"
     5  	"github.com/glide-im/glide/pkg/subscription"
     6  	"math"
     7  )
     8  
     9  type SubscriptionMessageStore struct {
    10  }
    11  
    12  func (c *SubscriptionMessageStore) NextSegmentSequence(id subscription.ChanID, info subscription.ChanInfo) (int64, int64, error) {
    13  	return 1, math.MaxInt64, nil
    14  }
    15  
    16  func (c *SubscriptionMessageStore) StoreChannelMessage(ch subscription.ChanID, msg *messages.ChatMessage) error {
    17  	return nil
    18  }
    19  
    20  type IdleSubscriptionStore struct {
    21  }
    22  
    23  func (i *IdleSubscriptionStore) NextSegmentSequence(id subscription.ChanID, info subscription.ChanInfo) (int64, int64, error) {
    24  	return 1, math.MaxInt64, nil
    25  }
    26  
    27  func (i *IdleSubscriptionStore) StoreChannelMessage(ch subscription.ChanID, msg *messages.ChatMessage) error {
    28  	return nil
    29  }