daemon

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2018 License: GPL-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Code generated by go-bindata. DO NOT EDIT. @generated sources: alarm.mp3

Index

Constants

View Source
const (
	PORT = ":52543"
)

Variables

View Source
var Alarm_Recurrence_name = map[int32]string{
	0: "NO_RECURRENCE",
	1: "HOURLY",
	2: "DAILY",
}
View Source
var Alarm_Recurrence_value = map[string]int32{
	"NO_RECURRENCE": 0,
	"HOURLY":        1,
	"DAILY":         2,
}
View Source
var Time_Format_name = map[int32]string{
	0: "TWENTYFOUR",
	1: "AM",
	2: "PM",
}
View Source
var Time_Format_value = map[string]int32{
	"TWENTYFOUR": 0,
	"AM":         1,
	"PM":         2,
}

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RegisterAlarmServiceServer

func RegisterAlarmServiceServer(s *grpc.Server, srv AlarmServiceServer)

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func Start

func Start()

Start is a blocking function that will setup database connection, start a scheduler and setup the gRPC server.

Types

type Alarm

type Alarm struct {
	Id                   int32            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Time                 *Time            `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	Recurrence           Alarm_Recurrence `protobuf:"varint,3,opt,name=recurrence,proto3,enum=daemon.Alarm_Recurrence" json:"recurrence,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Alarm) Descriptor

func (*Alarm) Descriptor() ([]byte, []int)

func (*Alarm) GetId

func (m *Alarm) GetId() int32

func (*Alarm) GetRecurrence

func (m *Alarm) GetRecurrence() Alarm_Recurrence

func (*Alarm) GetTime

func (m *Alarm) GetTime() *Time

func (*Alarm) ProtoMessage

func (*Alarm) ProtoMessage()

func (*Alarm) Reset

func (m *Alarm) Reset()

func (*Alarm) String

func (m *Alarm) String() string

func (*Alarm) XXX_DiscardUnknown

func (m *Alarm) XXX_DiscardUnknown()

func (*Alarm) XXX_Marshal

func (m *Alarm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Alarm) XXX_Merge

func (dst *Alarm) XXX_Merge(src proto.Message)

func (*Alarm) XXX_Size

func (m *Alarm) XXX_Size() int

func (*Alarm) XXX_Unmarshal

func (m *Alarm) XXX_Unmarshal(b []byte) error

type AlarmServiceClient

type AlarmServiceClient interface {
	SetAlarm(ctx context.Context, in *SetAlarmRequest, opts ...grpc.CallOption) (*SetAlarmResponse, error)
	GetAlarms(ctx context.Context, in *GetAlarmsRequest, opts ...grpc.CallOption) (*GetAlarmsResponse, error)
	RemoveAlarm(ctx context.Context, in *RemoveAlarmRequest, opts ...grpc.CallOption) (*RemoveAlarmResponse, error)
}

AlarmServiceClient is the client API for AlarmService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAlarmServiceClient

func NewAlarmServiceClient(cc *grpc.ClientConn) AlarmServiceClient

type AlarmServiceServer

type AlarmServiceServer interface {
	SetAlarm(context.Context, *SetAlarmRequest) (*SetAlarmResponse, error)
	GetAlarms(context.Context, *GetAlarmsRequest) (*GetAlarmsResponse, error)
	RemoveAlarm(context.Context, *RemoveAlarmRequest) (*RemoveAlarmResponse, error)
}

AlarmServiceServer is the server API for AlarmService service.

type Alarm_Recurrence

type Alarm_Recurrence int32
const (
	Alarm_NO_RECURRENCE Alarm_Recurrence = 0
	Alarm_HOURLY        Alarm_Recurrence = 1
	Alarm_DAILY         Alarm_Recurrence = 2
)

func (Alarm_Recurrence) EnumDescriptor

func (Alarm_Recurrence) EnumDescriptor() ([]byte, []int)

func (Alarm_Recurrence) String

func (x Alarm_Recurrence) String() string

type GetAlarmsRequest

type GetAlarmsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetAlarmsRequest) Descriptor

func (*GetAlarmsRequest) Descriptor() ([]byte, []int)

func (*GetAlarmsRequest) ProtoMessage

func (*GetAlarmsRequest) ProtoMessage()

func (*GetAlarmsRequest) Reset

func (m *GetAlarmsRequest) Reset()

func (*GetAlarmsRequest) String

func (m *GetAlarmsRequest) String() string

func (*GetAlarmsRequest) XXX_DiscardUnknown

func (m *GetAlarmsRequest) XXX_DiscardUnknown()

func (*GetAlarmsRequest) XXX_Marshal

func (m *GetAlarmsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAlarmsRequest) XXX_Merge

func (dst *GetAlarmsRequest) XXX_Merge(src proto.Message)

func (*GetAlarmsRequest) XXX_Size

func (m *GetAlarmsRequest) XXX_Size() int

func (*GetAlarmsRequest) XXX_Unmarshal

func (m *GetAlarmsRequest) XXX_Unmarshal(b []byte) error

type GetAlarmsResponse

type GetAlarmsResponse struct {
	Alarms               []*Alarm `protobuf:"bytes,1,rep,name=alarms,proto3" json:"alarms,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetAlarmsResponse) Descriptor

func (*GetAlarmsResponse) Descriptor() ([]byte, []int)

func (*GetAlarmsResponse) GetAlarms

func (m *GetAlarmsResponse) GetAlarms() []*Alarm

func (*GetAlarmsResponse) ProtoMessage

func (*GetAlarmsResponse) ProtoMessage()

func (*GetAlarmsResponse) Reset

func (m *GetAlarmsResponse) Reset()

func (*GetAlarmsResponse) String

func (m *GetAlarmsResponse) String() string

func (*GetAlarmsResponse) XXX_DiscardUnknown

func (m *GetAlarmsResponse) XXX_DiscardUnknown()

func (*GetAlarmsResponse) XXX_Marshal

func (m *GetAlarmsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAlarmsResponse) XXX_Merge

func (dst *GetAlarmsResponse) XXX_Merge(src proto.Message)

func (*GetAlarmsResponse) XXX_Size

func (m *GetAlarmsResponse) XXX_Size() int

func (*GetAlarmsResponse) XXX_Unmarshal

func (m *GetAlarmsResponse) XXX_Unmarshal(b []byte) error

type RemoveAlarmRequest

type RemoveAlarmRequest struct {
	AlarmId              int32    `protobuf:"varint,1,opt,name=alarm_id,json=alarmId,proto3" json:"alarm_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveAlarmRequest) Descriptor

func (*RemoveAlarmRequest) Descriptor() ([]byte, []int)

func (*RemoveAlarmRequest) GetAlarmId

func (m *RemoveAlarmRequest) GetAlarmId() int32

func (*RemoveAlarmRequest) ProtoMessage

func (*RemoveAlarmRequest) ProtoMessage()

func (*RemoveAlarmRequest) Reset

func (m *RemoveAlarmRequest) Reset()

func (*RemoveAlarmRequest) String

func (m *RemoveAlarmRequest) String() string

func (*RemoveAlarmRequest) XXX_DiscardUnknown

func (m *RemoveAlarmRequest) XXX_DiscardUnknown()

func (*RemoveAlarmRequest) XXX_Marshal

func (m *RemoveAlarmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveAlarmRequest) XXX_Merge

func (dst *RemoveAlarmRequest) XXX_Merge(src proto.Message)

func (*RemoveAlarmRequest) XXX_Size

func (m *RemoveAlarmRequest) XXX_Size() int

func (*RemoveAlarmRequest) XXX_Unmarshal

func (m *RemoveAlarmRequest) XXX_Unmarshal(b []byte) error

type RemoveAlarmResponse

type RemoveAlarmResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveAlarmResponse) Descriptor

func (*RemoveAlarmResponse) Descriptor() ([]byte, []int)

func (*RemoveAlarmResponse) ProtoMessage

func (*RemoveAlarmResponse) ProtoMessage()

func (*RemoveAlarmResponse) Reset

func (m *RemoveAlarmResponse) Reset()

func (*RemoveAlarmResponse) String

func (m *RemoveAlarmResponse) String() string

func (*RemoveAlarmResponse) XXX_DiscardUnknown

func (m *RemoveAlarmResponse) XXX_DiscardUnknown()

func (*RemoveAlarmResponse) XXX_Marshal

func (m *RemoveAlarmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveAlarmResponse) XXX_Merge

func (dst *RemoveAlarmResponse) XXX_Merge(src proto.Message)

func (*RemoveAlarmResponse) XXX_Size

func (m *RemoveAlarmResponse) XXX_Size() int

func (*RemoveAlarmResponse) XXX_Unmarshal

func (m *RemoveAlarmResponse) XXX_Unmarshal(b []byte) error

type SetAlarmRequest

type SetAlarmRequest struct {
	Alarm                *Alarm   `protobuf:"bytes,1,opt,name=alarm,proto3" json:"alarm,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetAlarmRequest) Descriptor

func (*SetAlarmRequest) Descriptor() ([]byte, []int)

func (*SetAlarmRequest) GetAlarm

func (m *SetAlarmRequest) GetAlarm() *Alarm

func (*SetAlarmRequest) ProtoMessage

func (*SetAlarmRequest) ProtoMessage()

func (*SetAlarmRequest) Reset

func (m *SetAlarmRequest) Reset()

func (*SetAlarmRequest) String

func (m *SetAlarmRequest) String() string

func (*SetAlarmRequest) XXX_DiscardUnknown

func (m *SetAlarmRequest) XXX_DiscardUnknown()

func (*SetAlarmRequest) XXX_Marshal

func (m *SetAlarmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetAlarmRequest) XXX_Merge

func (dst *SetAlarmRequest) XXX_Merge(src proto.Message)

func (*SetAlarmRequest) XXX_Size

func (m *SetAlarmRequest) XXX_Size() int

func (*SetAlarmRequest) XXX_Unmarshal

func (m *SetAlarmRequest) XXX_Unmarshal(b []byte) error

type SetAlarmResponse

type SetAlarmResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetAlarmResponse) Descriptor

func (*SetAlarmResponse) Descriptor() ([]byte, []int)

func (*SetAlarmResponse) ProtoMessage

func (*SetAlarmResponse) ProtoMessage()

func (*SetAlarmResponse) Reset

func (m *SetAlarmResponse) Reset()

func (*SetAlarmResponse) String

func (m *SetAlarmResponse) String() string

func (*SetAlarmResponse) XXX_DiscardUnknown

func (m *SetAlarmResponse) XXX_DiscardUnknown()

func (*SetAlarmResponse) XXX_Marshal

func (m *SetAlarmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetAlarmResponse) XXX_Merge

func (dst *SetAlarmResponse) XXX_Merge(src proto.Message)

func (*SetAlarmResponse) XXX_Size

func (m *SetAlarmResponse) XXX_Size() int

func (*SetAlarmResponse) XXX_Unmarshal

func (m *SetAlarmResponse) XXX_Unmarshal(b []byte) error

type Time

type Time struct {
	Hours                int32       `protobuf:"varint,1,opt,name=hours,proto3" json:"hours,omitempty"`
	Minutes              int32       `protobuf:"varint,2,opt,name=minutes,proto3" json:"minutes,omitempty"`
	Seconds              int32       `protobuf:"varint,3,opt,name=seconds,proto3" json:"seconds,omitempty"`
	Format               Time_Format `protobuf:"varint,4,opt,name=format,proto3,enum=daemon.Time_Format" json:"format,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Time) Descriptor

func (*Time) Descriptor() ([]byte, []int)

func (*Time) GetFormat

func (m *Time) GetFormat() Time_Format

func (*Time) GetHours

func (m *Time) GetHours() int32

func (*Time) GetMinutes

func (m *Time) GetMinutes() int32

func (*Time) GetSeconds

func (m *Time) GetSeconds() int32

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) Reset

func (m *Time) Reset()

func (*Time) String

func (m *Time) String() string

func (*Time) XXX_DiscardUnknown

func (m *Time) XXX_DiscardUnknown()

func (*Time) XXX_Marshal

func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Time) XXX_Merge

func (dst *Time) XXX_Merge(src proto.Message)

func (*Time) XXX_Size

func (m *Time) XXX_Size() int

func (*Time) XXX_Unmarshal

func (m *Time) XXX_Unmarshal(b []byte) error

type Time_Format

type Time_Format int32
const (
	Time_TWENTYFOUR Time_Format = 0
	Time_AM         Time_Format = 1
	Time_PM         Time_Format = 2
)

func (Time_Format) EnumDescriptor

func (Time_Format) EnumDescriptor() ([]byte, []int)

func (Time_Format) String

func (x Time_Format) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL