ambition

package
v0.0.0-...-b44b43e Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: Unlicense Imports: 6 Imported by: 10

Documentation

Overview

Package ambition is a generated protocol buffer package.

It is generated from these files:

ambition.proto

It has these top-level messages:

OccurrencesByDateReq
Action
CreateOccurrenceRequest
Occurrence
User
ActionsResponse
OccurrencesResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAmbitionServer

func RegisterAmbitionServer(s *grpc.Server, srv AmbitionServer)

Types

type Action

type Action struct {
	ID   int64  `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"`
	// TODO: Think about moving this to ambition-users
	// with a UserAction table
	UserID int64 `protobuf:"varint,3,opt,name=UserID" json:"UserID,omitempty"`
}

func (*Action) Descriptor

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

func (*Action) GetID

func (m *Action) GetID() int64

func (*Action) GetName

func (m *Action) GetName() string

func (*Action) GetUserID

func (m *Action) GetUserID() int64

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) Reset

func (m *Action) Reset()

func (*Action) String

func (m *Action) String() string

type ActionsResponse

type ActionsResponse struct {
	Actions []*Action `protobuf:"bytes,1,rep,name=Actions" json:"Actions,omitempty"`
}

func (*ActionsResponse) Descriptor

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

func (*ActionsResponse) GetActions

func (m *ActionsResponse) GetActions() []*Action

func (*ActionsResponse) ProtoMessage

func (*ActionsResponse) ProtoMessage()

func (*ActionsResponse) Reset

func (m *ActionsResponse) Reset()

func (*ActionsResponse) String

func (m *ActionsResponse) String() string

type AmbitionClient

type AmbitionClient interface {
	// CreateAction requires a UserID and a Name
	CreateAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (*Action, error)
	// CreateOccurrence requires a UserID and Occurrence.ActionID
	// TODO: If Datetime is provided it will be used
	// TODO: If Data is provided it will be stored
	CreateOccurrence(ctx context.Context, in *CreateOccurrenceRequest, opts ...grpc.CallOption) (*Occurrence, error)
	// ReadAction requires either an ID, or BOTH a UserId and Name
	ReadAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (*Action, error)
	// ReadAction
	// TODO:
	ReadActions(ctx context.Context, in *User, opts ...grpc.CallOption) (*ActionsResponse, error)
	ReadOccurrencesByDate(ctx context.Context, in *OccurrencesByDateReq, opts ...grpc.CallOption) (*OccurrencesResponse, error)
	// ReadOccurrences takes an action which must be populated with a
	// UserID and an ActionID which must match the values for that action
	// TODO:
	ReadOccurrences(ctx context.Context, in *Action, opts ...grpc.CallOption) (*OccurrencesResponse, error)
}

func NewAmbitionClient

func NewAmbitionClient(cc *grpc.ClientConn) AmbitionClient

type AmbitionServer

type AmbitionServer interface {
	// CreateAction requires a UserID and a Name
	CreateAction(context.Context, *Action) (*Action, error)
	// CreateOccurrence requires a UserID and Occurrence.ActionID
	// TODO: If Datetime is provided it will be used
	// TODO: If Data is provided it will be stored
	CreateOccurrence(context.Context, *CreateOccurrenceRequest) (*Occurrence, error)
	// ReadAction requires either an ID, or BOTH a UserId and Name
	ReadAction(context.Context, *Action) (*Action, error)
	// ReadAction
	// TODO:
	ReadActions(context.Context, *User) (*ActionsResponse, error)
	ReadOccurrencesByDate(context.Context, *OccurrencesByDateReq) (*OccurrencesResponse, error)
	// ReadOccurrences takes an action which must be populated with a
	// UserID and an ActionID which must match the values for that action
	// TODO:
	ReadOccurrences(context.Context, *Action) (*OccurrencesResponse, error)
}

type CreateOccurrenceRequest

type CreateOccurrenceRequest struct {
	UserID     int64       `protobuf:"varint,1,opt,name=UserID" json:"UserID,omitempty"`
	Occurrence *Occurrence `protobuf:"bytes,2,opt,name=Occurrence" json:"Occurrence,omitempty"`
}

func (*CreateOccurrenceRequest) Descriptor

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

func (*CreateOccurrenceRequest) GetOccurrence

func (m *CreateOccurrenceRequest) GetOccurrence() *Occurrence

func (*CreateOccurrenceRequest) GetUserID

func (m *CreateOccurrenceRequest) GetUserID() int64

func (*CreateOccurrenceRequest) ProtoMessage

func (*CreateOccurrenceRequest) ProtoMessage()

func (*CreateOccurrenceRequest) Reset

func (m *CreateOccurrenceRequest) Reset()

func (*CreateOccurrenceRequest) String

func (m *CreateOccurrenceRequest) String() string

type Occurrence

type Occurrence struct {
	ID       int64  `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"`
	ActionID int64  `protobuf:"varint,2,opt,name=ActionID" json:"ActionID,omitempty"`
	Datetime string `protobuf:"bytes,3,opt,name=Datetime" json:"Datetime,omitempty"`
	Data     string `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"`
}

func (*Occurrence) Descriptor

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

func (*Occurrence) GetActionID

func (m *Occurrence) GetActionID() int64

func (*Occurrence) GetData

func (m *Occurrence) GetData() string

func (*Occurrence) GetDatetime

func (m *Occurrence) GetDatetime() string

func (*Occurrence) GetID

func (m *Occurrence) GetID() int64

func (*Occurrence) ProtoMessage

func (*Occurrence) ProtoMessage()

func (*Occurrence) Reset

func (m *Occurrence) Reset()

func (*Occurrence) String

func (m *Occurrence) String() string

type OccurrencesByDateReq

type OccurrencesByDateReq struct {
	ActionID  int64  `protobuf:"varint,1,opt,name=ActionID" json:"ActionID,omitempty"`
	StartDate string `protobuf:"bytes,2,opt,name=StartDate" json:"StartDate,omitempty"`
	EndDate   string `protobuf:"bytes,3,opt,name=EndDate" json:"EndDate,omitempty"`
}

func (*OccurrencesByDateReq) Descriptor

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

func (*OccurrencesByDateReq) GetActionID

func (m *OccurrencesByDateReq) GetActionID() int64

func (*OccurrencesByDateReq) GetEndDate

func (m *OccurrencesByDateReq) GetEndDate() string

func (*OccurrencesByDateReq) GetStartDate

func (m *OccurrencesByDateReq) GetStartDate() string

func (*OccurrencesByDateReq) ProtoMessage

func (*OccurrencesByDateReq) ProtoMessage()

func (*OccurrencesByDateReq) Reset

func (m *OccurrencesByDateReq) Reset()

func (*OccurrencesByDateReq) String

func (m *OccurrencesByDateReq) String() string

type OccurrencesResponse

type OccurrencesResponse struct {
	Occurrences []*Occurrence `protobuf:"bytes,1,rep,name=Occurrences" json:"Occurrences,omitempty"`
}

func (*OccurrencesResponse) Descriptor

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

func (*OccurrencesResponse) GetOccurrences

func (m *OccurrencesResponse) GetOccurrences() []*Occurrence

func (*OccurrencesResponse) ProtoMessage

func (*OccurrencesResponse) ProtoMessage()

func (*OccurrencesResponse) Reset

func (m *OccurrencesResponse) Reset()

func (*OccurrencesResponse) String

func (m *OccurrencesResponse) String() string

type User

type User struct {
	UserID int64 `protobuf:"varint,1,opt,name=UserID" json:"UserID,omitempty"`
}

func (*User) Descriptor

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

func (*User) GetUserID

func (m *User) GetUserID() int64

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

Directories

Path Synopsis
cmd
svc
client/grpc
Package grpc provides a gRPC client for the Ambition service.
Package grpc provides a gRPC client for the Ambition service.
client/http
Package http provides an HTTP client for the Ambition service.
Package http provides an HTTP client for the Ambition service.

Jump to

Keyboard shortcuts

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