blob: 7879ebec47d2e8c346d0799c0ca0d677a6da6bcc [file] [log] [blame]
Don Newton379ae252019-04-01 12:17:06 -04001// Copyright (C) MongoDB, Inc. 2017-present.
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may
4// not use this file except in compliance with the License. You may obtain
5// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
7package internal
8
9import (
10 "time"
11 "github.com/mongodb/mongo-go-driver/bson/primitive"
12)
13
14// IsMasterResult is the result of executing this
15// ismaster command.
16type IsMasterResult struct {
17 Arbiters []string `bson:"arbiters,omitempty"`
18 ArbiterOnly bool `bson:"arbiterOnly,omitempty"`
19 ElectionID primitive.ObjectID `bson:"electionId,omitempty"`
20 Hidden bool `bson:"hidden,omitempty"`
21 Hosts []string `bson:"hosts,omitempty"`
22 IsMaster bool `bson:"ismaster,omitempty"`
23 IsReplicaSet bool `bson:"isreplicaset,omitempty"`
24 LastWriteTimestamp time.Time `bson:"lastWriteDate,omitempty"`
25 MaxBSONObjectSize uint32 `bson:"maxBsonObjectSize,omitempty"`
26 MaxMessageSizeBytes uint32 `bson:"maxMessageSizeBytes,omitempty"`
27 MaxWriteBatchSize uint16 `bson:"maxWriteBatchSize,omitempty"`
28 Me string `bson:"me,omitempty"`
29 MaxWireVersion int32 `bson:"maxWireVersion,omitempty"`
30 MinWireVersion int32 `bson:"minWireVersion,omitempty"`
31 Msg string `bson:"msg,omitempty"`
32 OK int32 `bson:"ok"`
33 Passives []string `bson:"passives,omitempty"`
34 ReadOnly bool `bson:"readOnly,omitempty"`
35 Secondary bool `bson:"secondary,omitempty"`
36 SetName string `bson:"setName,omitempty"`
37 SetVersion uint32 `bson:"setVersion,omitempty"`
38 Tags map[string]string `bson:"tags,omitempty"`
39}
40
41// BuildInfoResult is the result of executing the
42// buildInfo command.
43type BuildInfoResult struct {
44 OK bool `bson:"ok"`
45 GitVersion string `bson:"gitVersion,omitempty"`
46 Version string `bson:"version,omitempty"`
47 VersionArray []uint8 `bson:"versionArray,omitempty"`
48}
49
50// GetLastErrorResult is the result of executing the
51// getLastError command.
52type GetLastErrorResult struct {
53 ConnectionID uint32 `bson:"connectionId"`
54}