// NewMissionAck returns a new MissionAck
776424
func NewMissionAck(TARGET_SYSTEM uint8, TARGET_COMPONENT uint8, TYPE uint8) *MissionAck {
	m := MissionAck{}
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	m.TYPE = TYPE
	return &m
}
869314
func (m *CommandAck) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.COMMAND)
	binary.Write(data, binary.LittleEndian, m.RESULT)
	return data.Bytes()
}
968246
func newDeltaObjectToPack(base *ObjectToPack, original, delta plumbing.EncodedObject) *ObjectToPack {
	return &ObjectToPack{
		Object:   delta,
		Base:     base,
		Original: original,
		Depth:    base.Depth + 1,
	}
}
874276
func NewMembersSetPermissionsArg(User *UserSelectorArg, NewRole *AdminTier) *MembersSetPermissionsArg {
	s := new(MembersSetPermissionsArg)
	s.User = User
	s.NewRole = NewRole
	return s
}
380558
func New(dataDir string) (*Migrator, error) {
	// Check that the directory exists
	if _, err := os.Stat(dataDir); err != nil {
		return nil, err
	}

	// Create the struct
	m := &Migrator{
		ProgressCh: make(chan *ProgressUpdate, 128),
		dataDir:    dataDir,

		raftPath:      filepath.Join(dataDir, raftDir),
		mdbPath:       filepath.Join(dataDir, raftDir, mdbDir),
		mdbBackupPath: filepath.Join(dataDir, raftDir, mdbBackupDir),
		boltPath:      filepath.Join(dataDir, raftDir, boltFile),
		boltTempPath:  filepath.Join(dataDir, raftDir, boltTempFile),
	}

	return m, nil
}
619975
func (sc *conn) processAck(m *nats.Msg) {
	pa := &pb.PubAck{}
	err := pa.Unmarshal(m.Data)
	if err != nil {
		panic(fmt.Errorf("error during ack unmarshal: %v", err))
	}

	// Remove
	a := sc.removeAck(pa.Guid)
	if a != nil {
		// Capture error if it exists.
		if pa.Error != "" {
			err = errors.New(pa.Error)
		}
		if a.ah != nil {
			// Perform the ackHandler callback
			a.ah(pa.Guid, err)
		} else if a.ch != nil {
			// Send to channel directly
			a.ch <- err
		}
	}
}
323200
func (d *DotGit) NewObjectPack() (*PackWriter, error) {
	d.cleanPackList()
	return newPackWrite(d.fs)
}
841379
func newFolder(name string) *Folder {
	return &Folder{
		Name:    name,
		Path:    "",
		Folders: make(map[string]*Folder, 10),
		Files:   make(map[string]*File, 10),
	}
}
847681
func NewDir(inode uint64, provider FileContentProvider) *Dir {
	return &Dir{
		inode:    inode,
		nodes:    map[string]fs.Node{},
		provider: provider,
	}
}
369544
func New(name string) *Folder {
	f := newFolder(name)
	f.Root = true
	return f
}
933874
func NewMissionCurrent(SEQ uint16) *MissionCurrent {
	m := MissionCurrent{}
	m.SEQ = SEQ
	return &m
}
1257539
func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg {
	s := new(UnmountFolderArg)
	s.SharedFolderId = SharedFolderId
	return s
}
862304
func NewMissionItemReached(SEQ uint16) *MissionItemReached {
	m := MissionItemReached{}
	m.SEQ = SEQ
	return &m
}
1372472
func NewSaltpackSign(g *libkb.GlobalContext, arg *SaltpackSignArg) *SaltpackSign {
	return &SaltpackSign{
		arg:          arg,
		Contextified: libkb.NewContextified(g),
	}
}
194075
func (vtg *VTGate) MessageAck(ctx context.Context, request *vtgatepb.MessageAckRequest) (response *querypb.MessageAckResponse, err error) {
	defer vtg.server.HandlePanic(&err)
	ctx = withCallerIDContext(ctx, request.CallerId)
	count, vtgErr := vtg.server.MessageAck(ctx, request.Keyspace, request.Name, request.Ids)
	if vtgErr != nil {
		return nil, vterrors.ToGRPC(vtgErr)
	}
	return &querypb.MessageAckResponse{
		Result: &querypb.QueryResult{
			RowsAffected: uint64(count),
		},
	}, nil
}
869921
func NewMsgFilterLoad(filter []byte, hashFuncs uint32, tweak uint32, flags BloomUpdateType) *MsgFilterLoad {
	return &MsgFilterLoad{
		Filter:    filter,
		HashFuncs: hashFuncs,
		Tweak:     tweak,
		Flags:     flags,
	}
}
1002482
func New(mo Options) *Messenger {
	if mo.Mux == nil {
		mo.Mux = http.NewServeMux()
	}

	m := &Messenger{
		mux:       mo.Mux,
		token:     mo.Token,
		verify:    mo.Verify,
		appSecret: mo.AppSecret,
	}

	if mo.WebhookURL == "" {
		mo.WebhookURL = "/"
	}

	m.verifyHandler = newVerifyHandler(mo.VerifyToken)
	m.mux.HandleFunc(mo.WebhookURL, m.handle)

	return m
}