Created
May 5, 2024 00:40
-
-
Save judell/99b642cf0ed031e32e15dacb58cd5a82 to your computer and use it in GitHub Desktop.
callListAnything.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func listDevices(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) { | |
var visitor ListPredicate = func(client *kolide.Client, cursor string, limit int32, searches ...kolide.Search) (interface{}, error) { | |
return client.GetDevices(cursor, limit, searches...) | |
} | |
return listAnything(ctx, d, h, "kolide_device.listDevices", visitor, "Devices") | |
} | |
func listAdminUsers(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) { | |
var visitor ListPredicate = func(client *kolide.Client, cursor string, limit int32, searches ...kolide.Search) (interface{}, error) { | |
return client.GetAdminUsers(cursor, limit, searches...) | |
} | |
return listAnything(ctx, d, h, "kolide_admin_user.listAdminUsers", visitor, "AdminUsers") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment