SDK
SDK Golang v3.x
2

AdminExists #

Checks that an administrator account exists.

Arguments #

func (s *Server) AdminExists(options types.QueryOptions) (bool, error)
ArgumentsTypeDescription
options
types.QueryOptions
An object containing query options.

Options #

Additional query options

OptionTypeDescriptionDefault
Queuable
bool
If true, queues the request during downtime, until connected to Kuzzle againtrue

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 #

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