Documentation ¶
Index ¶
- Variables
- func RegisterVScreenServer(s *grpc.Server, srv VScreenServer)
- type Credential
- func (*Credential) Descriptor() ([]byte, []int)
- func (m *Credential) GetPassword() string
- func (*Credential) ProtoMessage()
- func (m *Credential) Reset()
- func (m *Credential) String() string
- func (m *Credential) XXX_DiscardUnknown()
- func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Credential) XXX_Merge(src proto.Message)
- func (m *Credential) XXX_Size() int
- func (m *Credential) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type Info
- func (*Info) Descriptor() ([]byte, []int)
- func (m *Info) GetPlaying() bool
- func (m *Info) GetPosition() float64
- func (m *Info) GetThumbnail() string
- func (m *Info) GetTitle() string
- func (m *Info) GetVolume() float64
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) String() string
- func (m *Info) XXX_DiscardUnknown()
- func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Info) XXX_Merge(src proto.Message)
- func (m *Info) XXX_Size() int
- func (m *Info) XXX_Unmarshal(b []byte) error
- type Position
- func (*Position) Descriptor() ([]byte, []int)
- func (m *Position) GetValue() float64
- func (*Position) ProtoMessage()
- func (m *Position) Reset()
- func (m *Position) String() string
- func (m *Position) XXX_DiscardUnknown()
- func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Position) XXX_Merge(src proto.Message)
- func (m *Position) XXX_Size() int
- func (m *Position) XXX_Unmarshal(b []byte) error
- type Server
- func (s *Server) Add(ctx context.Context, src *Source) (*Status, error)
- func (s *Server) Auth(ctx context.Context, c *Credential) (*Status, error)
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) Next(ctx context.Context, _ *Empty) (*Status, error)
- func (s *Server) Pause(ctx context.Context, _ *Empty) (*Status, error)
- func (s *Server) Play(ctx context.Context, _ *Empty) (*Status, error)
- func (s *Server) Seek(ctx context.Context, pos *Position) (*Status, error)
- func (s *Server) Stop(ctx context.Context, _ *Empty) (*Status, error)
- func (s *Server) Subscribe(user *User, stream VScreen_SubscribeServer) error
- func (s *Server) Unsubscribe(ctx context.Context, user *User) (*Status, error)
- type Source
- func (*Source) Descriptor() ([]byte, []int)
- func (m *Source) GetUrl() string
- func (*Source) ProtoMessage()
- func (m *Source) Reset()
- func (m *Source) String() string
- func (m *Source) XXX_DiscardUnknown()
- func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Source) XXX_Merge(src proto.Message)
- func (m *Source) XXX_Size() int
- func (m *Source) XXX_Unmarshal(b []byte) error
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetCode() StatusCode
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) String() string
- func (m *Status) XXX_DiscardUnknown()
- func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Status) XXX_Merge(src proto.Message)
- func (m *Status) XXX_Size() int
- func (m *Status) XXX_Unmarshal(b []byte) error
- type StatusCode
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetId() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type VScreenClient
- type VScreenServer
- type VScreen_SubscribeClient
- type VScreen_SubscribeServer
Constants ¶
This section is empty.
Variables ¶
View Source
var StatusCode_name = map[int32]string{
0: "OK",
1: "OPERATION_FAILED",
}
View Source
var StatusCode_value = map[string]int32{
"OK": 0,
"OPERATION_FAILED": 1,
}
Functions ¶
func RegisterVScreenServer ¶
func RegisterVScreenServer(s *grpc.Server, srv VScreenServer)
Types ¶
type Credential ¶
type Credential struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Credential) Descriptor ¶
func (*Credential) Descriptor() ([]byte, []int)
func (*Credential) GetPassword ¶
func (m *Credential) GetPassword() string
func (*Credential) ProtoMessage ¶
func (*Credential) ProtoMessage()
func (*Credential) Reset ¶
func (m *Credential) Reset()
func (*Credential) String ¶
func (m *Credential) String() string
func (*Credential) XXX_DiscardUnknown ¶
func (m *Credential) XXX_DiscardUnknown()
func (*Credential) XXX_Marshal ¶
func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Credential) XXX_Merge ¶
func (m *Credential) XXX_Merge(src proto.Message)
func (*Credential) XXX_Size ¶
func (m *Credential) XXX_Size() int
func (*Credential) XXX_Unmarshal ¶
func (m *Credential) XXX_Unmarshal(b []byte) error
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type Info ¶
type Info struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Thumbnail string `protobuf:"bytes,2,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` Volume float64 `protobuf:"fixed64,3,opt,name=volume,proto3" json:"volume,omitempty"` Position float64 `protobuf:"fixed64,4,opt,name=position,proto3" json:"position,omitempty"` Playing bool `protobuf:"varint,5,opt,name=playing,proto3" json:"playing,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Info) Descriptor ¶
func (*Info) GetPlaying ¶
func (*Info) GetPosition ¶
func (*Info) GetThumbnail ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) XXX_DiscardUnknown ¶
func (m *Info) XXX_DiscardUnknown()
func (*Info) XXX_Unmarshal ¶
type Position ¶
type Position struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Position) Descriptor ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) XXX_DiscardUnknown ¶
func (m *Position) XXX_DiscardUnknown()
func (*Position) XXX_Marshal ¶
func (*Position) XXX_Unmarshal ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
type Source ¶
type Source struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Source) Descriptor ¶
func (*Source) ProtoMessage ¶
func (*Source) ProtoMessage()
func (*Source) XXX_DiscardUnknown ¶
func (m *Source) XXX_DiscardUnknown()
func (*Source) XXX_Marshal ¶
func (*Source) XXX_Unmarshal ¶
type Status ¶
type Status struct { Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=StatusCode" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Status) Descriptor ¶
func (*Status) GetCode ¶
func (m *Status) GetCode() StatusCode
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) XXX_DiscardUnknown ¶
func (m *Status) XXX_DiscardUnknown()
func (*Status) XXX_Marshal ¶
func (*Status) XXX_Unmarshal ¶
type StatusCode ¶
type StatusCode int32
const ( StatusCode_OK StatusCode = 0 StatusCode_OPERATION_FAILED StatusCode = 1 )
func (StatusCode) EnumDescriptor ¶
func (StatusCode) EnumDescriptor() ([]byte, []int)
func (StatusCode) String ¶
func (x StatusCode) String() string
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type VScreenClient ¶
type VScreenClient interface { Auth(ctx context.Context, in *Credential, opts ...grpc.CallOption) (*Status, error) Play(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) Pause(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) Next(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) Add(ctx context.Context, in *Source, opts ...grpc.CallOption) (*Status, error) Seek(ctx context.Context, in *Position, opts ...grpc.CallOption) (*Status, error) Subscribe(ctx context.Context, in *User, opts ...grpc.CallOption) (VScreen_SubscribeClient, error) Unsubscribe(ctx context.Context, in *User, opts ...grpc.CallOption) (*Status, error) }
VScreenClient is the client API for VScreen service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewVScreenClient ¶
func NewVScreenClient(cc *grpc.ClientConn) VScreenClient
type VScreenServer ¶
type VScreenServer interface { Auth(context.Context, *Credential) (*Status, error) Play(context.Context, *Empty) (*Status, error) Pause(context.Context, *Empty) (*Status, error) Stop(context.Context, *Empty) (*Status, error) Next(context.Context, *Empty) (*Status, error) Add(context.Context, *Source) (*Status, error) Seek(context.Context, *Position) (*Status, error) Subscribe(*User, VScreen_SubscribeServer) error Unsubscribe(context.Context, *User) (*Status, error) }
VScreenServer is the server API for VScreen service.
type VScreen_SubscribeClient ¶
type VScreen_SubscribeClient interface { Recv() (*Info, error) grpc.ClientStream }
type VScreen_SubscribeServer ¶
type VScreen_SubscribeServer interface { Send(*Info) error grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.