Documentation ¶
Index ¶
- Constants
- func CreateTableSQLite(db *sql.DB) error
- func GenerateTestData(db *sql.DB) error
- func GetDB() *sql.DB
- func GetPool(db *sql.DB) *database.Pool
- func SetupTest(t *testing.T) (func(t *testing.T), *database.Pool)
- type Message
- func (m *Message) GetData() string
- func (m *Message) GetDurable() int16
- func (m *Message) GetExchange() string
- func (m *Message) GetID() string
- func (m *Message) GetRoutingKey() string
- func (m *Message) IsValid() error
- func (m *Message) SetData(data interface{})
- func (m *Message) SetDurable(durable int16)
- func (m *Message) SetExchange(exchange string)
- func (m *Message) SetID(id string)
- func (m *Message) SetRoutingKey(routingKey string)
- type MessageDB
- type MessageService
- func (s *MessageService) Create(exchange string, routingKey string, data string, durable int16) (*Message, error)
- func (s *MessageService) Delete(id string) error
- func (s *MessageService) Get(id string) (*Message, error)
- func (s *MessageService) GetNext() (*Message, error)
- func (s *MessageService) Send(exchange string, routingKey string, data string, durable int16) (*Message, error)
Constants ¶
View Source
const ( EXCHANGE_NOT_INFORMED = "exchange not informed" ROUTING_KEY_NOT_INFORMED = "routing key not informed" DATA_NOT_INFORMED = "data not informed" )
View Source
const ( DATABASE_GENERAL = "general" DATABASE_FINANCE = "finance" DATABASE_MESSAGING = "messaging" )
Variables ¶
This section is empty.
Functions ¶
func CreateTableSQLite ¶
func GenerateTestData ¶
Types ¶
type Message ¶
type Message struct { RabbitCacheID string `json:"id"` DE_Exchange string `json:"exchange" validate:"required"` DE_RoutingKey string `json:"routingKey" validate:"required"` JS_Data string `json:"data" validate:"required"` SN_Durable int16 `json:"durable" validate:"required"` TS_Operacao time.Time }
func NewMessage ¶
func NewMessage() *Message
func (*Message) GetDurable ¶
func (*Message) GetExchange ¶
func (*Message) GetRoutingKey ¶
func (*Message) SetDurable ¶
func (*Message) SetExchange ¶
func (*Message) SetRoutingKey ¶
type MessageDB ¶
type MessageDB struct {
// contains filtered or unexported fields
}
func NewMessageDB ¶
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(persistence *MessageDB) *MessageService
func (*MessageService) Delete ¶
func (s *MessageService) Delete(id string) error
func (*MessageService) GetNext ¶
func (s *MessageService) GetNext() (*Message, error)
Click to show internal directories.
Click to hide internal directories.