Documentation ¶
Overview ¶
Package testutil provides utilities for test.
Index ¶
- func Dashboard() *graylog.Dashboard
- func DummyAdmin() *graylog.User
- func DummyStream() *graylog.Stream
- func FullDashboard() *graylog.Dashboard
- func GetIndexSet(cl *client.Client, server *mockserver.Server, prefix string) (*graylog.IndexSet, func(string), error)
- func GetNonAdminUser(cl *client.Client) (*graylog.User, error)
- func GetRoleOrCreate(cl *client.Client, name string) (*graylog.Role, error)
- func GetServerAndClient() (*mockserver.Server, *client.Client, error)
- func GetStream(cl *client.Client, server *mockserver.Server, mode int) (*graylog.Stream, func(string), error)
- func IndexSet(prefix string) *graylog.IndexSet
- func Input() *graylog.Input
- func Role() *graylog.Role
- func Stream() *graylog.Stream
- func StreamRule() *graylog.StreamRule
- func User() *graylog.User
- func WaitAfterCreateIndexSet(server *mockserver.Server)
- func WaitAfterDeleteIndexSet(server *mockserver.Server)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dashboard ¶ added in v0.4.0
func Dashboard() *graylog.Dashboard
Dashboard returns a new Dashboard.
func FullDashboard ¶ added in v0.4.0
func FullDashboard() *graylog.Dashboard
FullDashboard returns a new Dashboard.
func GetIndexSet ¶
func GetIndexSet(cl *client.Client, server *mockserver.Server, prefix string) (*graylog.IndexSet, func(string), error)
GetIndexSet returns an IndexSet.
func GetNonAdminUser ¶
GetNonAdminUser returns a user whose name is not "admin".
func GetRoleOrCreate ¶
GetRoleOrCreate gets a given name's role. If no role whose name is a given name exists, create a role with a given name and returns it.
func GetServerAndClient ¶
func GetServerAndClient() (*mockserver.Server, *client.Client, error)
GetServerAndClient returns server and client.
func GetStream ¶
func GetStream(cl *client.Client, server *mockserver.Server, mode int) (*graylog.Stream, func(string), error)
GetStream returns a stream.
func WaitAfterCreateIndexSet ¶
func WaitAfterCreateIndexSet(server *mockserver.Server)
WaitAfterCreateIndexSet waits for a while after creates an index set if server is not a mock server.
func WaitAfterDeleteIndexSet ¶
func WaitAfterDeleteIndexSet(server *mockserver.Server)
WaitAfterDeleteIndexSet waits for a while after deletes an index set if server is not a mock server.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.