Versions in this module Expand all Collapse all v1 v1.4.1 Sep 27, 2020 Changes in this version + var ErrEmptyWriteConcern = errors.New("a write concern must have at least one field set") + var ErrInconsistent = errors.New("a write concern cannot have both w=0 and j=true") + var ErrNegativeW = errors.New("write concern `w` field cannot be a negative number") + var ErrNegativeWTimeout = errors.New("write concern `wtimeout` field cannot be negative") + func AckWrite(wc *WriteConcern) bool + func AcknowledgedValue(rawv bson.RawValue) bool + type Option func(concern *WriteConcern) + func J(j bool) Option + func W(w int) Option + func WMajority() Option + func WTagSet(tag string) Option + func WTimeout(d time.Duration) Option + type WriteConcern struct + func New(options ...Option) *WriteConcern + func (wc *WriteConcern) Acknowledged() bool + func (wc *WriteConcern) GetJ() bool + func (wc *WriteConcern) GetW() interface{} + func (wc *WriteConcern) GetWTimeout() time.Duration + func (wc *WriteConcern) IsValid() bool + func (wc *WriteConcern) MarshalBSONValue() (bsontype.Type, []byte, error) + func (wc *WriteConcern) WithOptions(options ...Option) *WriteConcern