sprawl/sprawl

View on GitHub
interfaces/ChannelService.go

Summary

Maintainability
A
0 mins
Test Coverage
package interfaces

import (
    "context"

    "github.com/sprawl/sprawl/pb"
)

// ChannelService is an interface to the Channel endpoints in sprawl.proto
type ChannelService interface {
    RegisterStorage(db Storage)
    RegisterP2p(p2p P2p)
    Join(ctx context.Context, in *pb.JoinRequest) (*pb.JoinResponse, error)
    Leave(ctx context.Context, in *pb.ChannelSpecificRequest) (*pb.Empty, error)
    GetChannel(ctx context.Context, in *pb.ChannelSpecificRequest) (*pb.Channel, error)
    GetAllChannels(ctx context.Context, in *pb.Empty) (*pb.ChannelList, error)
}