Documentation ¶
Index ¶
- Variables
- func RegisterEntriesServer(s grpc.ServiceRegistrar, srv EntriesServer)
- func RegisterStatusesServer(s grpc.ServiceRegistrar, srv StatusesServer)
- type CreateEntryRequest
- func (*CreateEntryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEntryRequest) GetEnd() *timestamppb.Timestamp
- func (x *CreateEntryRequest) GetEndBeforeIdOrZero() uint64
- func (x *CreateEntryRequest) GetName() string
- func (x *CreateEntryRequest) GetStart() *timestamppb.Timestamp
- func (x *CreateEntryRequest) GetStartAfterIdOrZero() uint64
- func (x *CreateEntryRequest) GetStartAfterLast() bool
- func (*CreateEntryRequest) ProtoMessage()
- func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message
- func (x *CreateEntryRequest) Reset()
- func (x *CreateEntryRequest) String() string
- type CreateEntryResponse
- func (*CreateEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEntryResponse) GetCreatedEntry() *Entry
- func (x *CreateEntryResponse) GetPreviouslyActiveEntry() *Entry
- func (*CreateEntryResponse) ProtoMessage()
- func (x *CreateEntryResponse) ProtoReflect() protoreflect.Message
- func (x *CreateEntryResponse) Reset()
- func (x *CreateEntryResponse) String() string
- type DeleteEntryRequest
- type DeleteEntryResponse
- func (*DeleteEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteEntryResponse) GetDeletedEntry() *Entry
- func (*DeleteEntryResponse) ProtoMessage()
- func (x *DeleteEntryResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteEntryResponse) Reset()
- func (x *DeleteEntryResponse) String() string
- type EntriesClient
- type EntriesServer
- type Entries_StreamEntryClient
- type Entries_StreamEntryServer
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)deprecated
- func (x *Entry) GetCreated() *timestamppb.Timestamp
- func (x *Entry) GetEnd() *timestamppb.Timestamp
- func (x *Entry) GetId() uint64
- func (x *Entry) GetName() string
- func (x *Entry) GetStart() *timestamppb.Timestamp
- func (x *Entry) GetUpdated() *timestamppb.Timestamp
- func (*Entry) ProtoMessage()
- func (x *Entry) ProtoReflect() protoreflect.Message
- func (x *Entry) Reset()
- func (x *Entry) String() string
- type Event
- type GetActiveEntryRequest
- type GetActiveEntryResponse
- func (*GetActiveEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetActiveEntryResponse) GetActiveEntry() *Entry
- func (*GetActiveEntryResponse) ProtoMessage()
- func (x *GetActiveEntryResponse) ProtoReflect() protoreflect.Message
- func (x *GetActiveEntryResponse) Reset()
- func (x *GetActiveEntryResponse) String() string
- type GetEntryListRequest
- func (*GetEntryListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetEntryListRequest) GetEnd() *timestamppb.Timestamp
- func (x *GetEntryListRequest) GetLimit() uint64
- func (x *GetEntryListRequest) GetNameFuzzy() string
- func (x *GetEntryListRequest) GetNameHighlightEnd() string
- func (x *GetEntryListRequest) GetNameHighlightStart() string
- func (x *GetEntryListRequest) GetShorthand() GetEntryListRequest_Shorthand
- func (x *GetEntryListRequest) GetStart() *timestamppb.Timestamp
- func (*GetEntryListRequest) ProtoMessage()
- func (x *GetEntryListRequest) ProtoReflect() protoreflect.Message
- func (x *GetEntryListRequest) Reset()
- func (x *GetEntryListRequest) String() string
- type GetEntryListRequest_Shorthand
- func (GetEntryListRequest_Shorthand) Descriptor() protoreflect.EnumDescriptor
- func (x GetEntryListRequest_Shorthand) Enum() *GetEntryListRequest_Shorthand
- func (GetEntryListRequest_Shorthand) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetEntryListRequest_Shorthand) Number() protoreflect.EnumNumber
- func (x GetEntryListRequest_Shorthand) String() string
- func (GetEntryListRequest_Shorthand) Type() protoreflect.EnumType
- type GetEntryListResponse
- func (*GetEntryListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetEntryListResponse) GetEntries() []*Entry
- func (*GetEntryListResponse) ProtoMessage()
- func (x *GetEntryListResponse) ProtoReflect() protoreflect.Message
- func (x *GetEntryListResponse) Reset()
- func (x *GetEntryListResponse) String() string
- type GetEntryRequest
- type GetEntryResponse
- type GetStatusRequest
- type GetStatusResponse
- type PingRequest
- type PingResponse
- type SetStatusRequest
- func (*SetStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetStatusRequest) GetAfkSince() *timestamppb.Timestamp
- func (x *SetStatusRequest) GetBackSince() *timestamppb.Timestamp
- func (*SetStatusRequest) ProtoMessage()
- func (x *SetStatusRequest) ProtoReflect() protoreflect.Message
- func (x *SetStatusRequest) Reset()
- func (x *SetStatusRequest) String() string
- type SetStatusResponse
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetAfkSince() *timestamppb.Timestamp
- func (x *Status) GetBackSince() *timestamppb.Timestamp
- func (x *Status) GetCreated() *timestamppb.Timestamp
- func (x *Status) GetUpdated() *timestamppb.Timestamp
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type StatusesClient
- type StatusesServer
- type Statuses_StreamStatusClient
- type Statuses_StreamStatusServer
- type StopActiveEntryRequest
- func (*StopActiveEntryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StopActiveEntryRequest) GetEnd() *timestamppb.Timestamp
- func (*StopActiveEntryRequest) ProtoMessage()
- func (x *StopActiveEntryRequest) ProtoReflect() protoreflect.Message
- func (x *StopActiveEntryRequest) Reset()
- func (x *StopActiveEntryRequest) String() string
- type StopActiveEntryResponse
- func (*StopActiveEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StopActiveEntryResponse) GetStoppedEntry() *Entry
- func (*StopActiveEntryResponse) ProtoMessage()
- func (x *StopActiveEntryResponse) ProtoReflect() protoreflect.Message
- func (x *StopActiveEntryResponse) Reset()
- func (x *StopActiveEntryResponse) String() string
- type StreamEntryRequest
- type StreamEntryResponse
- func (*StreamEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamEntryResponse) GetEntry() *Entry
- func (x *StreamEntryResponse) GetEvent() Event
- func (*StreamEntryResponse) ProtoMessage()
- func (x *StreamEntryResponse) ProtoReflect() protoreflect.Message
- func (x *StreamEntryResponse) Reset()
- func (x *StreamEntryResponse) String() string
- type StreamStatusRequest
- type StreamStatusResponse
- func (*StreamStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamStatusResponse) GetStatus() *Status
- func (*StreamStatusResponse) ProtoMessage()
- func (x *StreamStatusResponse) ProtoReflect() protoreflect.Message
- func (x *StreamStatusResponse) Reset()
- func (x *StreamStatusResponse) String() string
- type UnimplementedEntriesServer
- func (UnimplementedEntriesServer) CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error)
- func (UnimplementedEntriesServer) DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error)
- func (UnimplementedEntriesServer) GetActiveEntry(context.Context, *GetActiveEntryRequest) (*GetActiveEntryResponse, error)
- func (UnimplementedEntriesServer) GetEntry(context.Context, *GetEntryRequest) (*GetEntryResponse, error)
- func (UnimplementedEntriesServer) GetEntryList(context.Context, *GetEntryListRequest) (*GetEntryListResponse, error)
- func (UnimplementedEntriesServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedEntriesServer) StopActiveEntry(context.Context, *StopActiveEntryRequest) (*StopActiveEntryResponse, error)
- func (UnimplementedEntriesServer) StreamEntry(*StreamEntryRequest, Entries_StreamEntryServer) error
- func (UnimplementedEntriesServer) UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error)
- type UnimplementedStatusesServer
- func (UnimplementedStatusesServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
- func (UnimplementedStatusesServer) SetStatus(context.Context, *SetStatusRequest) (*SetStatusResponse, error)
- func (UnimplementedStatusesServer) StreamStatus(*StreamStatusRequest, Statuses_StreamStatusServer) error
- type UnsafeEntriesServer
- type UnsafeStatusesServer
- type UpdateEntryRequest
- func (*UpdateEntryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateEntryRequest) GetAppendName() bool
- func (x *UpdateEntryRequest) GetEnd() *timestamppb.Timestamp
- func (x *UpdateEntryRequest) GetEndBeforeIdOrZero() uint64
- func (x *UpdateEntryRequest) GetEndFuzzy() string
- func (x *UpdateEntryRequest) GetIdOrZero() uint64
- func (x *UpdateEntryRequest) GetName() string
- func (x *UpdateEntryRequest) GetStart() *timestamppb.Timestamp
- func (x *UpdateEntryRequest) GetStartAfterIdOrZero() uint64
- func (x *UpdateEntryRequest) GetStartAfterLast() bool
- func (x *UpdateEntryRequest) GetStartFuzzy() string
- func (*UpdateEntryRequest) ProtoMessage()
- func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateEntryRequest) Reset()
- func (x *UpdateEntryRequest) String() string
- type UpdateEntryResponse
- func (*UpdateEntryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateEntryResponse) GetAfter() *Entry
- func (x *UpdateEntryResponse) GetBefore() *Entry
- func (*UpdateEntryResponse) ProtoMessage()
- func (x *UpdateEntryResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateEntryResponse) Reset()
- func (x *UpdateEntryResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( GetEntryListRequest_Shorthand_name = map[int32]string{ 0: "SHORTHAND_UNSPECIFIED", 1: "SHORTHAND_PAST", 2: "SHORTHAND_FUTURE", 3: "SHORTHAND_THIS_DAY", 4: "SHORTHAND_THIS_MON_TO_SUN", 5: "SHORTHAND_PREV_DAY", 6: "SHORTHAND_PREV_MON_TO_SUN", 7: "SHORTHAND_NEXT_DAY", 8: "SHORTHAND_NEXT_MON_TO_SUN", } GetEntryListRequest_Shorthand_value = map[string]int32{ "SHORTHAND_UNSPECIFIED": 0, "SHORTHAND_PAST": 1, "SHORTHAND_FUTURE": 2, "SHORTHAND_THIS_DAY": 3, "SHORTHAND_THIS_MON_TO_SUN": 4, "SHORTHAND_PREV_DAY": 5, "SHORTHAND_PREV_MON_TO_SUN": 6, "SHORTHAND_NEXT_DAY": 7, "SHORTHAND_NEXT_MON_TO_SUN": 8, } )
Enum value maps for GetEntryListRequest_Shorthand.
var ( Event_name = map[int32]string{ 0: "EVENT_UNSPECIFIED", 1: "EVENT_CREATED", 2: "EVENT_UPDATED", 3: "EVENT_DELETED", } Event_value = map[string]int32{ "EVENT_UNSPECIFIED": 0, "EVENT_CREATED": 1, "EVENT_UPDATED": 2, "EVENT_DELETED": 3, } )
Enum value maps for Event.
var Entries_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dinkurapi.v1.Entries", HandlerType: (*EntriesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Entries_Ping_Handler, }, { MethodName: "GetEntry", Handler: _Entries_GetEntry_Handler, }, { MethodName: "GetActiveEntry", Handler: _Entries_GetActiveEntry_Handler, }, { MethodName: "GetEntryList", Handler: _Entries_GetEntryList_Handler, }, { MethodName: "CreateEntry", Handler: _Entries_CreateEntry_Handler, }, { MethodName: "UpdateEntry", Handler: _Entries_UpdateEntry_Handler, }, { MethodName: "DeleteEntry", Handler: _Entries_DeleteEntry_Handler, }, { MethodName: "StopActiveEntry", Handler: _Entries_StopActiveEntry_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamEntry", Handler: _Entries_StreamEntry_Handler, ServerStreams: true, }, }, Metadata: "api/dinkurapi/v1/entries.proto", }
Entries_ServiceDesc is the grpc.ServiceDesc for Entries service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_dinkurapi_v1_entries_proto protoreflect.FileDescriptor
var File_api_dinkurapi_v1_event_proto protoreflect.FileDescriptor
var File_api_dinkurapi_v1_statuses_proto protoreflect.FileDescriptor
var Statuses_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dinkurapi.v1.Statuses", HandlerType: (*StatusesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetStatus", Handler: _Statuses_SetStatus_Handler, }, { MethodName: "GetStatus", Handler: _Statuses_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamStatus", Handler: _Statuses_StreamStatus_Handler, ServerStreams: true, }, }, Metadata: "api/dinkurapi/v1/statuses.proto", }
Statuses_ServiceDesc is the grpc.ServiceDesc for Statuses service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterEntriesServer ¶
func RegisterEntriesServer(s grpc.ServiceRegistrar, srv EntriesServer)
func RegisterStatusesServer ¶
func RegisterStatusesServer(s grpc.ServiceRegistrar, srv StatusesServer)
Types ¶
type CreateEntryRequest ¶
type CreateEntryRequest struct { // Name is the name of the new entry to be created. May not be left unset. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Start is the timestamp of when the entry starts. If left unset, it will // default to now. Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` // End is the timestamp of when the entry ends. If set, the new entry will not // be marked as active. If left unset, any currently active entry will be // stopped at when this new entry starts. End *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` // StartAfterIdOrZero allows automatically setting the start timestamp to the // end timestamp of a entry by ID. StartAfterIdOrZero uint64 `protobuf:"varint,4,opt,name=start_after_id_or_zero,json=startAfterIdOrZero,proto3" json:"start_after_id_or_zero,omitempty"` // EndBeforeIdOrZero allows automatically setting the end timestamp to the // start timestamp of a entry by ID. EndBeforeIdOrZero uint64 `protobuf:"varint,5,opt,name=end_before_id_or_zero,json=endBeforeIdOrZero,proto3" json:"end_before_id_or_zero,omitempty"` // StartAfterLast allows automatically setting the start timestamp to the // end timestamp of the latest entry. Using this and the // "start after ID or zero" field is considered undefined behavior, and should // be avoided. StartAfterLast bool `protobuf:"varint,6,opt,name=start_after_last,json=startAfterLast,proto3" json:"start_after_last,omitempty"` // contains filtered or unexported fields }
CreateEntryRequest defines a new entry to be created.
func (*CreateEntryRequest) Descriptor
deprecated
func (*CreateEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateEntryRequest.ProtoReflect.Descriptor instead.
func (*CreateEntryRequest) GetEnd ¶
func (x *CreateEntryRequest) GetEnd() *timestamppb.Timestamp
func (*CreateEntryRequest) GetEndBeforeIdOrZero ¶
func (x *CreateEntryRequest) GetEndBeforeIdOrZero() uint64
func (*CreateEntryRequest) GetName ¶
func (x *CreateEntryRequest) GetName() string
func (*CreateEntryRequest) GetStart ¶
func (x *CreateEntryRequest) GetStart() *timestamppb.Timestamp
func (*CreateEntryRequest) GetStartAfterIdOrZero ¶
func (x *CreateEntryRequest) GetStartAfterIdOrZero() uint64
func (*CreateEntryRequest) GetStartAfterLast ¶
func (x *CreateEntryRequest) GetStartAfterLast() bool
func (*CreateEntryRequest) ProtoMessage ¶
func (*CreateEntryRequest) ProtoMessage()
func (*CreateEntryRequest) ProtoReflect ¶
func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message
func (*CreateEntryRequest) Reset ¶
func (x *CreateEntryRequest) Reset()
func (*CreateEntryRequest) String ¶
func (x *CreateEntryRequest) String() string
type CreateEntryResponse ¶
type CreateEntryResponse struct { // CreatedEntry is the newly created entry. CreatedEntry *Entry `protobuf:"bytes,1,opt,name=created_entry,json=createdEntry,proto3" json:"created_entry,omitempty"` // PreviouslyActiveEntry is the previously active entry that was stopped // (if any). PreviouslyActiveEntry *Entry `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
CreateEntryResponse holds the response data of a successfully created entry.
func (*CreateEntryResponse) Descriptor
deprecated
func (*CreateEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateEntryResponse.ProtoReflect.Descriptor instead.
func (*CreateEntryResponse) GetCreatedEntry ¶
func (x *CreateEntryResponse) GetCreatedEntry() *Entry
func (*CreateEntryResponse) GetPreviouslyActiveEntry ¶
func (x *CreateEntryResponse) GetPreviouslyActiveEntry() *Entry
func (*CreateEntryResponse) ProtoMessage ¶
func (*CreateEntryResponse) ProtoMessage()
func (*CreateEntryResponse) ProtoReflect ¶
func (x *CreateEntryResponse) ProtoReflect() protoreflect.Message
func (*CreateEntryResponse) Reset ¶
func (x *CreateEntryResponse) Reset()
func (*CreateEntryResponse) String ¶
func (x *CreateEntryResponse) String() string
type DeleteEntryRequest ¶
type DeleteEntryRequest struct { // Id is the ID of the entry to delete. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
DeleteEntryRequest holds the ID of the entry to delete.
func (*DeleteEntryRequest) Descriptor
deprecated
func (*DeleteEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteEntryRequest.ProtoReflect.Descriptor instead.
func (*DeleteEntryRequest) GetId ¶
func (x *DeleteEntryRequest) GetId() uint64
func (*DeleteEntryRequest) ProtoMessage ¶
func (*DeleteEntryRequest) ProtoMessage()
func (*DeleteEntryRequest) ProtoReflect ¶
func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message
func (*DeleteEntryRequest) Reset ¶
func (x *DeleteEntryRequest) Reset()
func (*DeleteEntryRequest) String ¶
func (x *DeleteEntryRequest) String() string
type DeleteEntryResponse ¶
type DeleteEntryResponse struct { // DeletedEntry is the entry that was deleted. DeletedEntry *Entry `protobuf:"bytes,1,opt,name=deleted_entry,json=deletedEntry,proto3" json:"deleted_entry,omitempty"` // contains filtered or unexported fields }
DeleteEntryResponse holds the entry that was deleted.
func (*DeleteEntryResponse) Descriptor
deprecated
func (*DeleteEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteEntryResponse.ProtoReflect.Descriptor instead.
func (*DeleteEntryResponse) GetDeletedEntry ¶
func (x *DeleteEntryResponse) GetDeletedEntry() *Entry
func (*DeleteEntryResponse) ProtoMessage ¶
func (*DeleteEntryResponse) ProtoMessage()
func (*DeleteEntryResponse) ProtoReflect ¶
func (x *DeleteEntryResponse) ProtoReflect() protoreflect.Message
func (*DeleteEntryResponse) Reset ¶
func (x *DeleteEntryResponse) Reset()
func (*DeleteEntryResponse) String ¶
func (x *DeleteEntryResponse) String() string
type EntriesClient ¶
type EntriesClient interface { // Ping pongs. Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) // GetEntry returns a specific entry by ID. Status 5 "NOT_FOUND" is // reported if no entry was found by that ID. GetEntry(ctx context.Context, in *GetEntryRequest, opts ...grpc.CallOption) (*GetEntryResponse, error) // GetActiveEntry returns the currently active entry (a entry with no end // time). If no such entry exists, then an empty reposne it returned instead. GetActiveEntry(ctx context.Context, in *GetActiveEntryRequest, opts ...grpc.CallOption) (*GetActiveEntryResponse, error) // GetEntryList queries for a list of entries. GetEntryList(ctx context.Context, in *GetEntryListRequest, opts ...grpc.CallOption) (*GetEntryListResponse, error) // CreateEntry creates a new entry and stops any currently active entries, and // returns the stopped previously active entry (if any) and the newly created // entry. CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error) // UpdateEntry alters a entry by ID and returns the entry's before and after // state. Status 5 "NOT_FOUND" is reported if no entry was found by that ID. UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*UpdateEntryResponse, error) // DeleteEntry removes a entry by ID. Status 5 "NOT_FOUND" is= // reported if no entry was found by that ID. DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error) // StopActiveEntry stops the currently active entry and returns that entry // (if any). StopActiveEntry(ctx context.Context, in *StopActiveEntryRequest, opts ...grpc.CallOption) (*StopActiveEntryResponse, error) // StreamAlert streams entry change events: created, updated, deleted. StreamEntry(ctx context.Context, in *StreamEntryRequest, opts ...grpc.CallOption) (Entries_StreamEntryClient, error) }
EntriesClient is the client API for Entries service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEntriesClient ¶
func NewEntriesClient(cc grpc.ClientConnInterface) EntriesClient
type EntriesServer ¶
type EntriesServer interface { // Ping pongs. Ping(context.Context, *PingRequest) (*PingResponse, error) // GetEntry returns a specific entry by ID. Status 5 "NOT_FOUND" is // reported if no entry was found by that ID. GetEntry(context.Context, *GetEntryRequest) (*GetEntryResponse, error) // GetActiveEntry returns the currently active entry (a entry with no end // time). If no such entry exists, then an empty reposne it returned instead. GetActiveEntry(context.Context, *GetActiveEntryRequest) (*GetActiveEntryResponse, error) // GetEntryList queries for a list of entries. GetEntryList(context.Context, *GetEntryListRequest) (*GetEntryListResponse, error) // CreateEntry creates a new entry and stops any currently active entries, and // returns the stopped previously active entry (if any) and the newly created // entry. CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error) // UpdateEntry alters a entry by ID and returns the entry's before and after // state. Status 5 "NOT_FOUND" is reported if no entry was found by that ID. UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error) // DeleteEntry removes a entry by ID. Status 5 "NOT_FOUND" is= // reported if no entry was found by that ID. DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error) // StopActiveEntry stops the currently active entry and returns that entry // (if any). StopActiveEntry(context.Context, *StopActiveEntryRequest) (*StopActiveEntryResponse, error) // StreamAlert streams entry change events: created, updated, deleted. StreamEntry(*StreamEntryRequest, Entries_StreamEntryServer) error // contains filtered or unexported methods }
EntriesServer is the server API for Entries service. All implementations must embed UnimplementedEntriesServer for forward compatibility
type Entries_StreamEntryClient ¶
type Entries_StreamEntryClient interface { Recv() (*StreamEntryResponse, error) grpc.ClientStream }
type Entries_StreamEntryServer ¶
type Entries_StreamEntryServer interface { Send(*StreamEntryResponse) error grpc.ServerStream }
type Entry ¶
type Entry struct { // Id is the unique identifier of this entry, and is used when deleting, // updating, or getting a entry via the Entries service. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Created is a timestamp of when the entry was initially created. In most // cases, this is the same as the entry's start timestamp. Created *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Updated is a timestamp of when the entry was most recently changed. This // has the same value as when the entry was created if it has never been // updated. Updated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Name is the name of this entry, as specified by the user. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // Start is the starting timestamp of this entry, as specified by the user. Start *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"` // End is the ending timestamp of this entry, as specified by the user, or // is left unset if the entry is currently active. End *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
Entry is a Dinkur entry.
func (*Entry) Descriptor
deprecated
func (*Entry) GetCreated ¶
func (x *Entry) GetCreated() *timestamppb.Timestamp
func (*Entry) GetEnd ¶
func (x *Entry) GetEnd() *timestamppb.Timestamp
func (*Entry) GetStart ¶
func (x *Entry) GetStart() *timestamppb.Timestamp
func (*Entry) GetUpdated ¶
func (x *Entry) GetUpdated() *timestamppb.Timestamp
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) ProtoReflect ¶
func (x *Entry) ProtoReflect() protoreflect.Message
type Event ¶
type Event int32
Event is an enumeration of different change states for a given object.
const ( // EVENT_UNSPECIFIED means the event is not properly initialized, and is // considered undefined behavior. Consumers should throw errors on this value // instead of trying to interpret it. Event_EVENT_UNSPECIFIED Event = 0 // EVENT_CREATED means the object was just created. Event_EVENT_CREATED Event = 1 // EVENT_CREATED means the object that previosuly existed and some field of // it has been changed. Event_EVENT_UPDATED Event = 2 // EVENT_DELETED means the object has been removed. Event_EVENT_DELETED Event = 3 )
func (Event) Descriptor ¶
func (Event) Descriptor() protoreflect.EnumDescriptor
func (Event) EnumDescriptor
deprecated
func (Event) Number ¶
func (x Event) Number() protoreflect.EnumNumber
func (Event) Type ¶
func (Event) Type() protoreflect.EnumType
type GetActiveEntryRequest ¶
type GetActiveEntryRequest struct {
// contains filtered or unexported fields
}
GetActiveEntryRequest is an empty message and unused. It is here as a placeholder for potential future use.
func (*GetActiveEntryRequest) Descriptor
deprecated
func (*GetActiveEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetActiveEntryRequest.ProtoReflect.Descriptor instead.
func (*GetActiveEntryRequest) ProtoMessage ¶
func (*GetActiveEntryRequest) ProtoMessage()
func (*GetActiveEntryRequest) ProtoReflect ¶
func (x *GetActiveEntryRequest) ProtoReflect() protoreflect.Message
func (*GetActiveEntryRequest) Reset ¶
func (x *GetActiveEntryRequest) Reset()
func (*GetActiveEntryRequest) String ¶
func (x *GetActiveEntryRequest) String() string
type GetActiveEntryResponse ¶
type GetActiveEntryResponse struct { // ActiveEntry is the currently active entry (if any). ActiveEntry *Entry `protobuf:"bytes,1,opt,name=active_entry,json=activeEntry,proto3" json:"active_entry,omitempty"` // contains filtered or unexported fields }
GetActiveEntryResponse holds the currently active entry (if any).
func (*GetActiveEntryResponse) Descriptor
deprecated
func (*GetActiveEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetActiveEntryResponse.ProtoReflect.Descriptor instead.
func (*GetActiveEntryResponse) GetActiveEntry ¶
func (x *GetActiveEntryResponse) GetActiveEntry() *Entry
func (*GetActiveEntryResponse) ProtoMessage ¶
func (*GetActiveEntryResponse) ProtoMessage()
func (*GetActiveEntryResponse) ProtoReflect ¶
func (x *GetActiveEntryResponse) ProtoReflect() protoreflect.Message
func (*GetActiveEntryResponse) Reset ¶
func (x *GetActiveEntryResponse) Reset()
func (*GetActiveEntryResponse) String ¶
func (x *GetActiveEntryResponse) String() string
type GetEntryListRequest ¶
type GetEntryListRequest struct { // Start is the starting timestamp bound of entries to list. Any entry that // either starts or ends after this time is included. Will override any start // timestamp (if any) set by the shorthand field. Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` // End is the ending timestamp bound of entries to list. Any entry that // either starts or ends before this time is included. Will override any end // timestamp (if any) set by the shorthand field. End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // Limit is the number of entries to include in the results. A value of zero // means no limit is applied. The limit is applied at the end of the results, // so a limit of 3 will return the 3 last entries. Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // Shorthand sets the default start and end timestamps to some predefined // time ranges, relative to now. Setting the start or end fields separately // will override the shorthand ranges. Shorthand GetEntryListRequest_Shorthand `protobuf:"varint,4,opt,name=shorthand,proto3,enum=dinkurapi.v1.GetEntryListRequest_Shorthand" json:"shorthand,omitempty"` // NameFuzzy adds fuzzy name searching. The algorithms used to match the // entries are left undefined and up to the Dinkur daemon to alter at any // time. By default, a trigram index is used to allow substring matches. NameFuzzy string `protobuf:"bytes,5,opt,name=name_fuzzy,json=nameFuzzy,proto3" json:"name_fuzzy,omitempty"` // NameHighlightStart enables name search result highlighting. It does nothing // if the fuzzy name query is empty. Setting a value of "<b>", while setting // the highlight end field to "</b>" will effectively add HTML-styled bold // styling to the matching search terms. NameHighlightStart string `protobuf:"bytes,6,opt,name=name_highlight_start,json=nameHighlightStart,proto3" json:"name_highlight_start,omitempty"` // NameHighlightEnd enables name search result highlighting. It does nothing // if the fuzzy name query is empty. NameHighlightEnd string `protobuf:"bytes,7,opt,name=name_highlight_end,json=nameHighlightEnd,proto3" json:"name_highlight_end,omitempty"` // contains filtered or unexported fields }
GetEntryListRequest holds query parameters for listing entries. All fields adds additional filters, where they combined with the AND operator. An empty request message will return all entries.
func (*GetEntryListRequest) Descriptor
deprecated
func (*GetEntryListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetEntryListRequest.ProtoReflect.Descriptor instead.
func (*GetEntryListRequest) GetEnd ¶
func (x *GetEntryListRequest) GetEnd() *timestamppb.Timestamp
func (*GetEntryListRequest) GetLimit ¶
func (x *GetEntryListRequest) GetLimit() uint64
func (*GetEntryListRequest) GetNameFuzzy ¶
func (x *GetEntryListRequest) GetNameFuzzy() string
func (*GetEntryListRequest) GetNameHighlightEnd ¶
func (x *GetEntryListRequest) GetNameHighlightEnd() string
func (*GetEntryListRequest) GetNameHighlightStart ¶
func (x *GetEntryListRequest) GetNameHighlightStart() string
func (*GetEntryListRequest) GetShorthand ¶
func (x *GetEntryListRequest) GetShorthand() GetEntryListRequest_Shorthand
func (*GetEntryListRequest) GetStart ¶
func (x *GetEntryListRequest) GetStart() *timestamppb.Timestamp
func (*GetEntryListRequest) ProtoMessage ¶
func (*GetEntryListRequest) ProtoMessage()
func (*GetEntryListRequest) ProtoReflect ¶
func (x *GetEntryListRequest) ProtoReflect() protoreflect.Message
func (*GetEntryListRequest) Reset ¶
func (x *GetEntryListRequest) Reset()
func (*GetEntryListRequest) String ¶
func (x *GetEntryListRequest) String() string
type GetEntryListRequest_Shorthand ¶
type GetEntryListRequest_Shorthand int32
Shorthand is an enumeration of time span shorthands used for easier queries.
const ( // UNSPECIFIED means no shorthand filtering is applied. GetEntryListRequest_SHORTHAND_UNSPECIFIED GetEntryListRequest_Shorthand = 0 // SHORTHAND_PAST sets the default end timestamp to now, while leaving the // start timestamp unchanged. GetEntryListRequest_SHORTHAND_PAST GetEntryListRequest_Shorthand = 1 // SHORTHAND_FUTURE sets the default start timestamp to now, while leaving // the end timestamp unchanged. GetEntryListRequest_SHORTHAND_FUTURE GetEntryListRequest_Shorthand = 2 // SHORTHAND_THIS_DAY sets the default start timestamp to 00:00:00 today // and the default end timestamp to 23:59:59 today. GetEntryListRequest_SHORTHAND_THIS_DAY GetEntryListRequest_Shorthand = 3 // SHORTHAND_THIS_MON_TO_SUN sets the default start timestamp to 00:00:00 // on monday this week and the default end timestamp to 23:59:59 on sunday // this week. GetEntryListRequest_SHORTHAND_THIS_MON_TO_SUN GetEntryListRequest_Shorthand = 4 // SHORTHAND_PREV_DAY sets the default start timestamp to 00:00:00 yesterday // and the default end timestamp to 23:59:59 yesterday. GetEntryListRequest_SHORTHAND_PREV_DAY GetEntryListRequest_Shorthand = 5 // SHORTHAND_PREV_MON_TO_SUN sets the default start timestamp to 00:00:00 // on monday last week and the default end timestamp to 23:59:59 on sunday // last week. GetEntryListRequest_SHORTHAND_PREV_MON_TO_SUN GetEntryListRequest_Shorthand = 6 // SHORTHAND_NEXT_DAY sets the default start timestamp to 00:00:00 tomorrow // and the default end timestamp to 23:59:59 tomorrow. GetEntryListRequest_SHORTHAND_NEXT_DAY GetEntryListRequest_Shorthand = 7 // SHORTHAND_NEXT_MON_TO_SUN sets the default start timestamp to 00:00:00 // on monday next week and the default end timestamp to 23:59:59 on sunday // next week. GetEntryListRequest_SHORTHAND_NEXT_MON_TO_SUN GetEntryListRequest_Shorthand = 8 )
func (GetEntryListRequest_Shorthand) Descriptor ¶
func (GetEntryListRequest_Shorthand) Descriptor() protoreflect.EnumDescriptor
func (GetEntryListRequest_Shorthand) Enum ¶
func (x GetEntryListRequest_Shorthand) Enum() *GetEntryListRequest_Shorthand
func (GetEntryListRequest_Shorthand) EnumDescriptor
deprecated
func (GetEntryListRequest_Shorthand) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetEntryListRequest_Shorthand.Descriptor instead.
func (GetEntryListRequest_Shorthand) Number ¶
func (x GetEntryListRequest_Shorthand) Number() protoreflect.EnumNumber
func (GetEntryListRequest_Shorthand) String ¶
func (x GetEntryListRequest_Shorthand) String() string
func (GetEntryListRequest_Shorthand) Type ¶
func (GetEntryListRequest_Shorthand) Type() protoreflect.EnumType
type GetEntryListResponse ¶
type GetEntryListResponse struct { // Entries is the list of entries that matches the search request. Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // contains filtered or unexported fields }
GetEntryListResponse holds the list of entries that matches the search request.
func (*GetEntryListResponse) Descriptor
deprecated
func (*GetEntryListResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetEntryListResponse.ProtoReflect.Descriptor instead.
func (*GetEntryListResponse) GetEntries ¶
func (x *GetEntryListResponse) GetEntries() []*Entry
func (*GetEntryListResponse) ProtoMessage ¶
func (*GetEntryListResponse) ProtoMessage()
func (*GetEntryListResponse) ProtoReflect ¶
func (x *GetEntryListResponse) ProtoReflect() protoreflect.Message
func (*GetEntryListResponse) Reset ¶
func (x *GetEntryListResponse) Reset()
func (*GetEntryListResponse) String ¶
func (x *GetEntryListResponse) String() string
type GetEntryRequest ¶
type GetEntryRequest struct { // Id is the ID of the entry to get. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
GetEntryRequest holds the ID of the entry to get.
func (*GetEntryRequest) Descriptor
deprecated
func (*GetEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetEntryRequest.ProtoReflect.Descriptor instead.
func (*GetEntryRequest) GetId ¶
func (x *GetEntryRequest) GetId() uint64
func (*GetEntryRequest) ProtoMessage ¶
func (*GetEntryRequest) ProtoMessage()
func (*GetEntryRequest) ProtoReflect ¶
func (x *GetEntryRequest) ProtoReflect() protoreflect.Message
func (*GetEntryRequest) Reset ¶
func (x *GetEntryRequest) Reset()
func (*GetEntryRequest) String ¶
func (x *GetEntryRequest) String() string
type GetEntryResponse ¶
type GetEntryResponse struct { // Entry is the entry gotten by ID. Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` // contains filtered or unexported fields }
GetEntryResponse holds the entry gotten by ID.
func (*GetEntryResponse) Descriptor
deprecated
func (*GetEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetEntryResponse.ProtoReflect.Descriptor instead.
func (*GetEntryResponse) GetEntry ¶
func (x *GetEntryResponse) GetEntry() *Entry
func (*GetEntryResponse) ProtoMessage ¶
func (*GetEntryResponse) ProtoMessage()
func (*GetEntryResponse) ProtoReflect ¶
func (x *GetEntryResponse) ProtoReflect() protoreflect.Message
func (*GetEntryResponse) Reset ¶
func (x *GetEntryResponse) Reset()
func (*GetEntryResponse) String ¶
func (x *GetEntryResponse) String() string
type GetStatusRequest ¶
type GetStatusRequest struct {
// contains filtered or unexported fields
}
GetStatusRequest is an empty message and unused. It is here as a placeholder for potential future use.
func (*GetStatusRequest) Descriptor
deprecated
func (*GetStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead.
func (*GetStatusRequest) ProtoMessage ¶
func (*GetStatusRequest) ProtoMessage()
func (*GetStatusRequest) ProtoReflect ¶
func (x *GetStatusRequest) ProtoReflect() protoreflect.Message
func (*GetStatusRequest) Reset ¶
func (x *GetStatusRequest) Reset()
func (*GetStatusRequest) String ¶
func (x *GetStatusRequest) String() string
type GetStatusResponse ¶
type GetStatusResponse struct { // Status is the current status. Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
GetStatusResponse holds the current status.
func (*GetStatusResponse) Descriptor
deprecated
func (*GetStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead.
func (*GetStatusResponse) GetStatus ¶
func (x *GetStatusResponse) GetStatus() *Status
func (*GetStatusResponse) ProtoMessage ¶
func (*GetStatusResponse) ProtoMessage()
func (*GetStatusResponse) ProtoReflect ¶
func (x *GetStatusResponse) ProtoReflect() protoreflect.Message
func (*GetStatusResponse) Reset ¶
func (x *GetStatusResponse) Reset()
func (*GetStatusResponse) String ¶
func (x *GetStatusResponse) String() string
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
PingRequest is an empty message and unused. It is here as a placeholder for potential future use.
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
// contains filtered or unexported fields
}
PingResponse is an empty message and unused. It is here as a placeholder for potential future use.
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type SetStatusRequest ¶
type SetStatusRequest struct { // AfkSince is set whenever the user has gone AFK. AfkSince *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=afk_since,json=afkSince,proto3" json:"afk_since,omitempty"` // BackSince is set whenever the user has returned from being AFK, but has not // yet resolved their AFK status. BackSince *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=back_since,json=backSince,proto3" json:"back_since,omitempty"` // contains filtered or unexported fields }
SetStatusRequest
func (*SetStatusRequest) Descriptor
deprecated
func (*SetStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetStatusRequest.ProtoReflect.Descriptor instead.
func (*SetStatusRequest) GetAfkSince ¶
func (x *SetStatusRequest) GetAfkSince() *timestamppb.Timestamp
func (*SetStatusRequest) GetBackSince ¶
func (x *SetStatusRequest) GetBackSince() *timestamppb.Timestamp
func (*SetStatusRequest) ProtoMessage ¶
func (*SetStatusRequest) ProtoMessage()
func (*SetStatusRequest) ProtoReflect ¶
func (x *SetStatusRequest) ProtoReflect() protoreflect.Message
func (*SetStatusRequest) Reset ¶
func (x *SetStatusRequest) Reset()
func (*SetStatusRequest) String ¶
func (x *SetStatusRequest) String() string
type SetStatusResponse ¶
type SetStatusResponse struct {
// contains filtered or unexported fields
}
SetStatusResponse is an empty message and unused. It is here as a placeholder for potential future use.
func (*SetStatusResponse) Descriptor
deprecated
func (*SetStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetStatusResponse.ProtoReflect.Descriptor instead.
func (*SetStatusResponse) ProtoMessage ¶
func (*SetStatusResponse) ProtoMessage()
func (*SetStatusResponse) ProtoReflect ¶
func (x *SetStatusResponse) ProtoReflect() protoreflect.Message
func (*SetStatusResponse) Reset ¶
func (x *SetStatusResponse) Reset()
func (*SetStatusResponse) String ¶
func (x *SetStatusResponse) String() string
type Status ¶
type Status struct { // Created is a timestamp of when the status was initially issued. Created *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Updated is a timestamp of when the status was most recently changed. This // has the same value as when the status was created if it has never been // updated. Updated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // AfkSince is set whenever the user has gone AFK. AfkSince *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=afk_since,json=afkSince,proto3" json:"afk_since,omitempty"` // BackSince is set whenever the user has returned from being AFK, but has not // yet resolved their AFK status. BackSince *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=back_since,json=backSince,proto3" json:"back_since,omitempty"` // contains filtered or unexported fields }
Status is a sort of notification issued by the Dinkur daemon, and contains a union type of different status types.
func (*Status) Descriptor
deprecated
func (*Status) GetAfkSince ¶
func (x *Status) GetAfkSince() *timestamppb.Timestamp
func (*Status) GetBackSince ¶
func (x *Status) GetBackSince() *timestamppb.Timestamp
func (*Status) GetCreated ¶
func (x *Status) GetCreated() *timestamppb.Timestamp
func (*Status) GetUpdated ¶
func (x *Status) GetUpdated() *timestamppb.Timestamp
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type StatusesClient ¶
type StatusesClient interface { // StreamStatus streams status change events. StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (Statuses_StreamStatusClient, error) // SetStatus updates the current status. SetStatus(ctx context.Context, in *SetStatusRequest, opts ...grpc.CallOption) (*SetStatusResponse, error) // GetStatus gets the current status. GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) }
StatusesClient is the client API for Statuses service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewStatusesClient ¶
func NewStatusesClient(cc grpc.ClientConnInterface) StatusesClient
type StatusesServer ¶
type StatusesServer interface { // StreamStatus streams status change events. StreamStatus(*StreamStatusRequest, Statuses_StreamStatusServer) error // SetStatus updates the current status. SetStatus(context.Context, *SetStatusRequest) (*SetStatusResponse, error) // GetStatus gets the current status. GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) // contains filtered or unexported methods }
StatusesServer is the server API for Statuses service. All implementations must embed UnimplementedStatusesServer for forward compatibility
type Statuses_StreamStatusClient ¶
type Statuses_StreamStatusClient interface { Recv() (*StreamStatusResponse, error) grpc.ClientStream }
type Statuses_StreamStatusServer ¶
type Statuses_StreamStatusServer interface { Send(*StreamStatusResponse) error grpc.ServerStream }
type StopActiveEntryRequest ¶
type StopActiveEntryRequest struct { // End allows changing the end timestamp of the active entry to stop. If not // set, the current timestamp is used instead. End *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
StopActiveEntryRequest holds fields used when stopping the currently active entry.
func (*StopActiveEntryRequest) Descriptor
deprecated
func (*StopActiveEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use StopActiveEntryRequest.ProtoReflect.Descriptor instead.
func (*StopActiveEntryRequest) GetEnd ¶
func (x *StopActiveEntryRequest) GetEnd() *timestamppb.Timestamp
func (*StopActiveEntryRequest) ProtoMessage ¶
func (*StopActiveEntryRequest) ProtoMessage()
func (*StopActiveEntryRequest) ProtoReflect ¶
func (x *StopActiveEntryRequest) ProtoReflect() protoreflect.Message
func (*StopActiveEntryRequest) Reset ¶
func (x *StopActiveEntryRequest) Reset()
func (*StopActiveEntryRequest) String ¶
func (x *StopActiveEntryRequest) String() string
type StopActiveEntryResponse ¶
type StopActiveEntryResponse struct { // StoppedEntry is the entry that was stopped (if any). StoppedEntry *Entry `protobuf:"bytes,1,opt,name=stopped_entry,json=stoppedEntry,proto3" json:"stopped_entry,omitempty"` // contains filtered or unexported fields }
StopActiveEntryResponse holds the entry that was stopped (if any).
func (*StopActiveEntryResponse) Descriptor
deprecated
func (*StopActiveEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use StopActiveEntryResponse.ProtoReflect.Descriptor instead.
func (*StopActiveEntryResponse) GetStoppedEntry ¶
func (x *StopActiveEntryResponse) GetStoppedEntry() *Entry
func (*StopActiveEntryResponse) ProtoMessage ¶
func (*StopActiveEntryResponse) ProtoMessage()
func (*StopActiveEntryResponse) ProtoReflect ¶
func (x *StopActiveEntryResponse) ProtoReflect() protoreflect.Message
func (*StopActiveEntryResponse) Reset ¶
func (x *StopActiveEntryResponse) Reset()
func (*StopActiveEntryResponse) String ¶
func (x *StopActiveEntryResponse) String() string
type StreamEntryRequest ¶
type StreamEntryRequest struct {
// contains filtered or unexported fields
}
StreamEntryRequest is an empty message and unused. It is here as a placeholder for potential future use.
func (*StreamEntryRequest) Descriptor
deprecated
func (*StreamEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamEntryRequest.ProtoReflect.Descriptor instead.
func (*StreamEntryRequest) ProtoMessage ¶
func (*StreamEntryRequest) ProtoMessage()
func (*StreamEntryRequest) ProtoReflect ¶
func (x *StreamEntryRequest) ProtoReflect() protoreflect.Message
func (*StreamEntryRequest) Reset ¶
func (x *StreamEntryRequest) Reset()
func (*StreamEntryRequest) String ¶
func (x *StreamEntryRequest) String() string
type StreamEntryResponse ¶
type StreamEntryResponse struct { // Entry is the created, updated, or deleted entry. Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` // Event is the type of event. Event Event `protobuf:"varint,2,opt,name=event,proto3,enum=dinkurapi.v1.Event" json:"event,omitempty"` // contains filtered or unexported fields }
StreamEntryResponse is a entry event. A entry has been created, updated, or deleted.
func (*StreamEntryResponse) Descriptor
deprecated
func (*StreamEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamEntryResponse.ProtoReflect.Descriptor instead.
func (*StreamEntryResponse) GetEntry ¶
func (x *StreamEntryResponse) GetEntry() *Entry
func (*StreamEntryResponse) GetEvent ¶
func (x *StreamEntryResponse) GetEvent() Event
func (*StreamEntryResponse) ProtoMessage ¶
func (*StreamEntryResponse) ProtoMessage()
func (*StreamEntryResponse) ProtoReflect ¶
func (x *StreamEntryResponse) ProtoReflect() protoreflect.Message
func (*StreamEntryResponse) Reset ¶
func (x *StreamEntryResponse) Reset()
func (*StreamEntryResponse) String ¶
func (x *StreamEntryResponse) String() string
type StreamStatusRequest ¶
type StreamStatusRequest struct {
// contains filtered or unexported fields
}
StreamStatusRequest is an empty message and unused. It is here as a placeholder for potential future use.
func (*StreamStatusRequest) Descriptor
deprecated
func (*StreamStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamStatusRequest.ProtoReflect.Descriptor instead.
func (*StreamStatusRequest) ProtoMessage ¶
func (*StreamStatusRequest) ProtoMessage()
func (*StreamStatusRequest) ProtoReflect ¶
func (x *StreamStatusRequest) ProtoReflect() protoreflect.Message
func (*StreamStatusRequest) Reset ¶
func (x *StreamStatusRequest) Reset()
func (*StreamStatusRequest) String ¶
func (x *StreamStatusRequest) String() string
type StreamStatusResponse ¶
type StreamStatusResponse struct { // Status is the new status value. Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
StreamStatusResponse is returned every time a the status is updated.
func (*StreamStatusResponse) Descriptor
deprecated
func (*StreamStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamStatusResponse.ProtoReflect.Descriptor instead.
func (*StreamStatusResponse) GetStatus ¶
func (x *StreamStatusResponse) GetStatus() *Status
func (*StreamStatusResponse) ProtoMessage ¶
func (*StreamStatusResponse) ProtoMessage()
func (*StreamStatusResponse) ProtoReflect ¶
func (x *StreamStatusResponse) ProtoReflect() protoreflect.Message
func (*StreamStatusResponse) Reset ¶
func (x *StreamStatusResponse) Reset()
func (*StreamStatusResponse) String ¶
func (x *StreamStatusResponse) String() string
type UnimplementedEntriesServer ¶
type UnimplementedEntriesServer struct { }
UnimplementedEntriesServer must be embedded to have forward compatible implementations.
func (UnimplementedEntriesServer) CreateEntry ¶
func (UnimplementedEntriesServer) CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error)
func (UnimplementedEntriesServer) DeleteEntry ¶
func (UnimplementedEntriesServer) DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error)
func (UnimplementedEntriesServer) GetActiveEntry ¶
func (UnimplementedEntriesServer) GetActiveEntry(context.Context, *GetActiveEntryRequest) (*GetActiveEntryResponse, error)
func (UnimplementedEntriesServer) GetEntry ¶
func (UnimplementedEntriesServer) GetEntry(context.Context, *GetEntryRequest) (*GetEntryResponse, error)
func (UnimplementedEntriesServer) GetEntryList ¶
func (UnimplementedEntriesServer) GetEntryList(context.Context, *GetEntryListRequest) (*GetEntryListResponse, error)
func (UnimplementedEntriesServer) Ping ¶
func (UnimplementedEntriesServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedEntriesServer) StopActiveEntry ¶
func (UnimplementedEntriesServer) StopActiveEntry(context.Context, *StopActiveEntryRequest) (*StopActiveEntryResponse, error)
func (UnimplementedEntriesServer) StreamEntry ¶
func (UnimplementedEntriesServer) StreamEntry(*StreamEntryRequest, Entries_StreamEntryServer) error
func (UnimplementedEntriesServer) UpdateEntry ¶
func (UnimplementedEntriesServer) UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error)
type UnimplementedStatusesServer ¶
type UnimplementedStatusesServer struct { }
UnimplementedStatusesServer must be embedded to have forward compatible implementations.
func (UnimplementedStatusesServer) GetStatus ¶
func (UnimplementedStatusesServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
func (UnimplementedStatusesServer) SetStatus ¶
func (UnimplementedStatusesServer) SetStatus(context.Context, *SetStatusRequest) (*SetStatusResponse, error)
func (UnimplementedStatusesServer) StreamStatus ¶
func (UnimplementedStatusesServer) StreamStatus(*StreamStatusRequest, Statuses_StreamStatusServer) error
type UnsafeEntriesServer ¶
type UnsafeEntriesServer interface {
// contains filtered or unexported methods
}
UnsafeEntriesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EntriesServer will result in compilation errors.
type UnsafeStatusesServer ¶
type UnsafeStatusesServer interface {
// contains filtered or unexported methods
}
UnsafeStatusesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StatusesServer will result in compilation errors.
type UpdateEntryRequest ¶
type UpdateEntryRequest struct { // IdOrZero is either the ID of the entry to update, or left as zero to update // the latest or currently active entry. IdOrZero uint64 `protobuf:"varint,1,opt,name=id_or_zero,json=idOrZero,proto3" json:"id_or_zero,omitempty"` // Name is the new name of the entry. If left unset, the name will not be // updated. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Start is the new starting timestamp of the entry. If left unset, the start // timestamp will not be updated. Start *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` // End is the new ending timestamp of the entry. If left unset, the end // timestamp will not be updated. If set and the entry was previously active // then the entry is no longer active. End *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` // AppendName changes the name field in this message to be appended to the // end of the previous name, with a space as delimiter. AppendName bool `protobuf:"varint,5,opt,name=append_name,json=appendName,proto3" json:"append_name,omitempty"` // StartAfterIdOrZero allows automatically setting the start timestamp to the // end timestamp of a entry by ID. StartAfterIdOrZero uint64 `protobuf:"varint,6,opt,name=start_after_id_or_zero,json=startAfterIdOrZero,proto3" json:"start_after_id_or_zero,omitempty"` // EndBeforeIdOrZero allows automatically setting the end timestamp to the // start timestamp of a entry by ID. If set and the entry was previously // active then the entry is no longer active. EndBeforeIdOrZero uint64 `protobuf:"varint,7,opt,name=end_before_id_or_zero,json=endBeforeIdOrZero,proto3" json:"end_before_id_or_zero,omitempty"` // StartAfterLast allows automatically setting the start timestamp to the // end timestamp of the latest entry. Using this and the // "start after ID or zero" field is considered undefined behavior, and should // be avoided. StartAfterLast bool `protobuf:"varint,8,opt,name=start_after_last,json=startAfterLast,proto3" json:"start_after_last,omitempty"` // StartFuzzy is the new entry start timestamp, but will be parsed fuzzy. // This is ignored if empty string or if Start is supplied. // // No change to the entry start timestamp is applied if this is set to empty. StartFuzzy string `protobuf:"bytes,9,opt,name=start_fuzzy,json=startFuzzy,proto3" json:"start_fuzzy,omitempty"` // EndFuzzy is the new entry end timestamp, but will be parsed fuzzy. // This is ignored if empty string or if End is supplied. // // No change to the entry end timestamp is applied if this is set to empty. EndFuzzy string `protobuf:"bytes,10,opt,name=end_fuzzy,json=endFuzzy,proto3" json:"end_fuzzy,omitempty"` // contains filtered or unexported fields }
UpdateEntryRequest holds data for updating a entry.
func (*UpdateEntryRequest) Descriptor
deprecated
func (*UpdateEntryRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateEntryRequest.ProtoReflect.Descriptor instead.
func (*UpdateEntryRequest) GetAppendName ¶
func (x *UpdateEntryRequest) GetAppendName() bool
func (*UpdateEntryRequest) GetEnd ¶
func (x *UpdateEntryRequest) GetEnd() *timestamppb.Timestamp
func (*UpdateEntryRequest) GetEndBeforeIdOrZero ¶
func (x *UpdateEntryRequest) GetEndBeforeIdOrZero() uint64
func (*UpdateEntryRequest) GetEndFuzzy ¶
func (x *UpdateEntryRequest) GetEndFuzzy() string
func (*UpdateEntryRequest) GetIdOrZero ¶
func (x *UpdateEntryRequest) GetIdOrZero() uint64
func (*UpdateEntryRequest) GetName ¶
func (x *UpdateEntryRequest) GetName() string
func (*UpdateEntryRequest) GetStart ¶
func (x *UpdateEntryRequest) GetStart() *timestamppb.Timestamp
func (*UpdateEntryRequest) GetStartAfterIdOrZero ¶
func (x *UpdateEntryRequest) GetStartAfterIdOrZero() uint64
func (*UpdateEntryRequest) GetStartAfterLast ¶
func (x *UpdateEntryRequest) GetStartAfterLast() bool
func (*UpdateEntryRequest) GetStartFuzzy ¶
func (x *UpdateEntryRequest) GetStartFuzzy() string
func (*UpdateEntryRequest) ProtoMessage ¶
func (*UpdateEntryRequest) ProtoMessage()
func (*UpdateEntryRequest) ProtoReflect ¶
func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message
func (*UpdateEntryRequest) Reset ¶
func (x *UpdateEntryRequest) Reset()
func (*UpdateEntryRequest) String ¶
func (x *UpdateEntryRequest) String() string
type UpdateEntryResponse ¶
type UpdateEntryResponse struct { // Before is the state of the entry before the update. Before *Entry `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` // After is the up-to-date state of the entry now after the update. After *Entry `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"` // contains filtered or unexported fields }
UpdateEntryResponse holds the before and after state of the updated entry.
func (*UpdateEntryResponse) Descriptor
deprecated
func (*UpdateEntryResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateEntryResponse.ProtoReflect.Descriptor instead.
func (*UpdateEntryResponse) GetAfter ¶
func (x *UpdateEntryResponse) GetAfter() *Entry
func (*UpdateEntryResponse) GetBefore ¶
func (x *UpdateEntryResponse) GetBefore() *Entry
func (*UpdateEntryResponse) ProtoMessage ¶
func (*UpdateEntryResponse) ProtoMessage()
func (*UpdateEntryResponse) ProtoReflect ¶
func (x *UpdateEntryResponse) ProtoReflect() protoreflect.Message
func (*UpdateEntryResponse) Reset ¶
func (x *UpdateEntryResponse) Reset()
func (*UpdateEntryResponse) String ¶
func (x *UpdateEntryResponse) String() string