AdminExists

Checks that an administrator account exists.

Arguments

Copied to clipboard!
func (s *Server) AdminExists(options types.QueryOptions) (bool, error)
Arguments Type Description
options
types.QueryOptions
An object containing query options.

Options

Additional query options

Option Type Description Default
Queuable
bool
If true, queues the request during downtime, until connected to Kuzzle again true

Return

Returns a bool set to true if an admin exists and false if it does not, or a KuzzleError. See how to handle error.

Usage

Copied to clipboard!
exists, err := kuzzle.Server.AdminExists(nil)
if err != nil {
  log.Fatal(err)
} else {
  fmt.Println("Admin exists?", exists)
}