github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/libfs/tlf_edit_history_file.go (about) 1 // Copyright 2015-2016 Keybase Inc. All rights reserved. 2 // Use of this source code is governed by a BSD 3 // license that can be found in the LICENSE file. 4 5 package libfs 6 7 import ( 8 "time" 9 10 "github.com/keybase/client/go/kbfs/data" 11 "github.com/keybase/client/go/kbfs/libkbfs" 12 "golang.org/x/net/context" 13 ) 14 15 // GetEncodedTlfEditHistory returns serialized JSON containing the 16 // file edit history for a folder. 17 func GetEncodedTlfEditHistory(ctx context.Context, config libkbfs.Config, 18 folderBranch data.FolderBranch) ( 19 data []byte, t time.Time, err error) { 20 edits, err := config.KBFSOps().GetEditHistory(ctx, folderBranch) 21 if err != nil { 22 return nil, time.Time{}, err 23 } 24 25 data, err = PrettyJSON(edits) 26 return data, time.Time{}, err 27 }