cribl

package module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 11 Imported by: 0

README

Cribl Go SDK

Authentication

Please fetch a Bearer token for the Cribl Cloud free tier here

SDK Installation

go get github.com/speakeasy-sdks/cribl-go

SDK Example Usage

package main

import(
	"context"
	"log"
	"github.com/speakeasy-sdks/cribl-go"
	"github.com/speakeasy-sdks/cribl-go/pkg/models/shared"
)

func main() {
    s := cribl.New(
        cribl.WithSecurity(shared.Security{
            BearerAuth: "",
        }),
    )

    ctx := context.Background()
    res, err := s.AppscopeConfigs.Create(ctx, shared.AppscopeLibEntry{
        Config: shared.AppscopeConfigWithCustom{
            Cribl: &shared.AppscopeConfigWithCustomCribl{
                Authtoken: cribl.String("corrupti"),
                Enable: cribl.Bool(false),
                Transport: &shared.AppscopeTransport{
                    Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                    Host: cribl.String("distinctio"),
                    Path: cribl.String("quibusdam"),
                    Port: cribl.Int64(602763),
                    TLS: &shared.AppscopeTransportTLS{
                        Cacertpath: cribl.String("nulla"),
                        Enable: cribl.Bool(false),
                        Validateserver: cribl.Bool(false),
                    },
                    Type: cribl.String("corrupti"),
                },
                UseScopeSourceTransport: cribl.Bool(false),
            },
            Custom: []shared.AppscopeCustom{
                shared.AppscopeCustom{
                    Ancestor: cribl.String("vel"),
                    Arg: cribl.String("error"),
                    Config: shared.AppscopeConfig{
                        Cribl: &shared.AppscopeConfigCribl{
                            Authtoken: cribl.String("deserunt"),
                            Enable: cribl.Bool(false),
                            Transport: &shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("iure"),
                                Path: cribl.String("magnam"),
                                Port: cribl.Int64(891773),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("ipsa"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("delectus"),
                            },
                            UseScopeSourceTransport: cribl.Bool(false),
                        },
                        Event: &shared.AppscopeConfigEvent{
                            Enable: false,
                            Format: shared.AppscopeConfigEventFormat{
                                Enhancefs: false,
                                Maxeventpersec: 272656,
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("molestiae"),
                                Path: cribl.String("minus"),
                                Port: cribl.Int64(812169),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("voluptatum"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("iusto"),
                            },
                            Type: shared.AppscopeConfigEventTypeNdjson,
                            Watch: []shared.AppscopeConfigEventWatch{
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("nisi"),
                                    Headers: cribl.String("recusandae"),
                                    Name: cribl.String("Miss Raymond Hauck III"),
                                    Type: "repellendus",
                                    Value: cribl.String("sapiente"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("quo"),
                                    Headers: cribl.String("odit"),
                                    Name: cribl.String("Wilfred Wolff"),
                                    Type: "quod",
                                    Value: cribl.String("esse"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("totam"),
                                    Headers: cribl.String("porro"),
                                    Name: cribl.String("Samuel Reichel"),
                                    Type: "fugit",
                                    Value: cribl.String("deleniti"),
                                },
                            },
                        },
                        Libscope: &shared.AppscopeConfigLibscope{
                            Commanddir: cribl.String("hic"),
                            Configevent: cribl.Bool(false),
                            Log: &shared.AppscopeConfigLibscopeLog{
                                Level: shared.AppscopeConfigLibscopeLogLevelError.ToPointer(),
                                Transport: &shared.AppscopeTransport{
                                    Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                    Host: cribl.String("beatae"),
                                    Path: cribl.String("commodi"),
                                    Port: cribl.Int64(473600),
                                    TLS: &shared.AppscopeTransportTLS{
                                        Cacertpath: cribl.String("modi"),
                                        Enable: cribl.Bool(false),
                                        Validateserver: cribl.Bool(false),
                                    },
                                    Type: cribl.String("qui"),
                                },
                            },
                            Summaryperiod: cribl.Int64(774234),
                        },
                        Metric: &shared.AppscopeConfigMetric{
                            Enable: false,
                            Format: shared.AppscopeConfigMetricFormat{
                                Statsdmaxlen: cribl.Int64(736918),
                                Statsdprefix: cribl.String("esse"),
                                Type: cribl.String("ipsum"),
                                Verbosity: cribl.Int64(568434),
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("perferendis"),
                                Path: cribl.String("ad"),
                                Port: cribl.Int64(617636),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("sed"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("iste"),
                            },
                            Watch: []string{
                                "natus",
                            },
                        },
                        Payload: &shared.AppscopeConfigPayload{
                            Dir: "laboriosam",
                            Enable: false,
                        },
                        Protocol: []shared.AppscopeConfigProtocol{
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 902599,
                                Name: "Harvey Hessel",
                                Payload: false,
                                Regex: "saepe",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 697631,
                                Name: "Brenda Wisozk",
                                Payload: false,
                                Regex: "laborum",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 170909,
                                Name: "Stacy Champlin",
                                Payload: false,
                                Regex: "omnis",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 363711,
                                Name: "Velma Batz",
                                Payload: false,
                                Regex: "doloribus",
                            },
                        },
                        Tags: []shared.AppscopeConfigTags{
                            shared.AppscopeConfigTags{
                                Key: "architecto",
                                Value: "mollitia",
                            },
                            shared.AppscopeConfigTags{
                                Key: "dolorem",
                                Value: "culpa",
                            },
                            shared.AppscopeConfigTags{
                                Key: "consequuntur",
                                Value: "repellat",
                            },
                            shared.AppscopeConfigTags{
                                Key: "mollitia",
                                Value: "occaecati",
                            },
                        },
                    },
                    Env: cribl.String("numquam"),
                    Hostname: cribl.String("immediate-instructor.info"),
                    Procname: cribl.String("velit"),
                    Username: cribl.String("Linda.Cronin"),
                },
                shared.AppscopeCustom{
                    Ancestor: cribl.String("laborum"),
                    Arg: cribl.String("animi"),
                    Config: shared.AppscopeConfig{
                        Cribl: &shared.AppscopeConfigCribl{
                            Authtoken: cribl.String("enim"),
                            Enable: cribl.Bool(false),
                            Transport: &shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("quo"),
                                Path: cribl.String("sequi"),
                                Port: cribl.Int64(949572),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("ipsam"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("id"),
                            },
                            UseScopeSourceTransport: cribl.Bool(false),
                        },
                        Event: &shared.AppscopeConfigEvent{
                            Enable: false,
                            Format: shared.AppscopeConfigEventFormat{
                                Enhancefs: false,
                                Maxeventpersec: 820994,
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("quasi"),
                                Path: cribl.String("error"),
                                Port: cribl.Int64(837945),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("laborum"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("quasi"),
                            },
                            Type: shared.AppscopeConfigEventTypeNdjson,
                            Watch: []shared.AppscopeConfigEventWatch{
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("voluptatibus"),
                                    Headers: cribl.String("vero"),
                                    Name: cribl.String("Miss Irma Wolff"),
                                    Type: "cum",
                                    Value: cribl.String("perferendis"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("doloremque"),
                                    Headers: cribl.String("reprehenderit"),
                                    Name: cribl.String("Shawna Carter"),
                                    Type: "iusto",
                                    Value: cribl.String("dicta"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("harum"),
                                    Headers: cribl.String("enim"),
                                    Name: cribl.String("Mrs. Leslie VonRueden"),
                                    Type: "molestias",
                                    Value: cribl.String("excepturi"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("pariatur"),
                                    Headers: cribl.String("modi"),
                                    Name: cribl.String("Dr. Jordan Von"),
                                    Type: "veritatis",
                                    Value: cribl.String("itaque"),
                                },
                            },
                        },
                        Libscope: &shared.AppscopeConfigLibscope{
                            Commanddir: cribl.String("incidunt"),
                            Configevent: cribl.Bool(false),
                            Log: &shared.AppscopeConfigLibscopeLog{
                                Level: shared.AppscopeConfigLibscopeLogLevelInfo.ToPointer(),
                                Transport: &shared.AppscopeTransport{
                                    Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                    Host: cribl.String("est"),
                                    Path: cribl.String("quibusdam"),
                                    Port: cribl.Int64(131797),
                                    TLS: &shared.AppscopeTransportTLS{
                                        Cacertpath: cribl.String("deserunt"),
                                        Enable: cribl.Bool(false),
                                        Validateserver: cribl.Bool(false),
                                    },
                                    Type: cribl.String("distinctio"),
                                },
                            },
                            Summaryperiod: cribl.Int64(841386),
                        },
                        Metric: &shared.AppscopeConfigMetric{
                            Enable: false,
                            Format: shared.AppscopeConfigMetricFormat{
                                Statsdmaxlen: cribl.Int64(289406),
                                Statsdprefix: cribl.String("modi"),
                                Type: cribl.String("qui"),
                                Verbosity: cribl.Int64(397821),
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                Host: cribl.String("quos"),
                                Path: cribl.String("perferendis"),
                                Port: cribl.Int64(164940),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("assumenda"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("ipsam"),
                            },
                            Watch: []string{
                                "fugit",
                            },
                        },
                        Payload: &shared.AppscopeConfigPayload{
                            Dir: "dolorum",
                            Enable: false,
                        },
                        Protocol: []shared.AppscopeConfigProtocol{
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 270008,
                                Name: "Geoffrey Green",
                                Payload: false,
                                Regex: "non",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 756107,
                                Name: "Gilbert Medhurst",
                                Payload: false,
                                Regex: "officia",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 223081,
                                Name: "Randal Parisian",
                                Payload: false,
                                Regex: "illum",
                            },
                        },
                        Tags: []shared.AppscopeConfigTags{
                            shared.AppscopeConfigTags{
                                Key: "rerum",
                                Value: "dicta",
                            },
                            shared.AppscopeConfigTags{
                                Key: "magnam",
                                Value: "cumque",
                            },
                            shared.AppscopeConfigTags{
                                Key: "facere",
                                Value: "ea",
                            },
                            shared.AppscopeConfigTags{
                                Key: "aliquid",
                                Value: "laborum",
                            },
                        },
                    },
                    Env: cribl.String("accusamus"),
                    Hostname: cribl.String("exemplary-mover.biz"),
                    Procname: cribl.String("accusamus"),
                    Username: cribl.String("Virgil_Pouros"),
                },
                shared.AppscopeCustom{
                    Ancestor: cribl.String("id"),
                    Arg: cribl.String("blanditiis"),
                    Config: shared.AppscopeConfig{
                        Cribl: &shared.AppscopeConfigCribl{
                            Authtoken: cribl.String("deleniti"),
                            Enable: cribl.Bool(false),
                            Transport: &shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                Host: cribl.String("amet"),
                                Path: cribl.String("deserunt"),
                                Port: cribl.Int64(394869),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("vel"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("natus"),
                            },
                            UseScopeSourceTransport: cribl.Bool(false),
                        },
                        Event: &shared.AppscopeConfigEvent{
                            Enable: false,
                            Format: shared.AppscopeConfigEventFormat{
                                Enhancefs: false,
                                Maxeventpersec: 606393,
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("perferendis"),
                                Path: cribl.String("nihil"),
                                Port: cribl.Int64(301575),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("distinctio"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("id"),
                            },
                            Type: shared.AppscopeConfigEventTypeNdjson,
                            Watch: []shared.AppscopeConfigEventWatch{
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("labore"),
                                    Headers: cribl.String("suscipit"),
                                    Name: cribl.String("Robin Keebler"),
                                    Type: "architecto",
                                    Value: cribl.String("magnam"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("et"),
                                    Headers: cribl.String("excepturi"),
                                    Name: cribl.String("Ramona Lueilwitz MD"),
                                    Type: "reiciendis",
                                    Value: cribl.String("mollitia"),
                                },
                            },
                        },
                        Libscope: &shared.AppscopeConfigLibscope{
                            Commanddir: cribl.String("ad"),
                            Configevent: cribl.Bool(false),
                            Log: &shared.AppscopeConfigLibscopeLog{
                                Level: shared.AppscopeConfigLibscopeLogLevelWarning.ToPointer(),
                                Transport: &shared.AppscopeTransport{
                                    Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                    Host: cribl.String("necessitatibus"),
                                    Path: cribl.String("odit"),
                                    Port: cribl.Int64(367562),
                                    TLS: &shared.AppscopeTransportTLS{
                                        Cacertpath: cribl.String("quasi"),
                                        Enable: cribl.Bool(false),
                                        Validateserver: cribl.Bool(false),
                                    },
                                    Type: cribl.String("iure"),
                                },
                            },
                            Summaryperiod: cribl.Int64(984043),
                        },
                        Metric: &shared.AppscopeConfigMetric{
                            Enable: false,
                            Format: shared.AppscopeConfigMetricFormat{
                                Statsdmaxlen: cribl.Int64(891924),
                                Statsdprefix: cribl.String("eius"),
                                Type: cribl.String("maxime"),
                                Verbosity: cribl.Int64(537023),
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                Host: cribl.String("in"),
                                Path: cribl.String("architecto"),
                                Port: cribl.Int64(99569),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("repudiandae"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("ullam"),
                            },
                            Watch: []string{
                                "nihil",
                                "repellat",
                                "quibusdam",
                            },
                        },
                        Payload: &shared.AppscopeConfigPayload{
                            Dir: "sed",
                            Enable: false,
                        },
                        Protocol: []shared.AppscopeConfigProtocol{
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 868126,
                                Name: "Kathryn Lang",
                                Payload: false,
                                Regex: "sunt",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 779051,
                                Name: "Ervin Schoen",
                                Payload: false,
                                Regex: "odit",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 407183,
                                Name: "Virginia Wunsch",
                                Payload: false,
                                Regex: "voluptate",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 420075,
                                Name: "Gary Streich",
                                Payload: false,
                                Regex: "perferendis",
                            },
                        },
                        Tags: []shared.AppscopeConfigTags{
                            shared.AppscopeConfigTags{
                                Key: "amet",
                                Value: "aut",
                            },
                            shared.AppscopeConfigTags{
                                Key: "cumque",
                                Value: "corporis",
                            },
                            shared.AppscopeConfigTags{
                                Key: "hic",
                                Value: "libero",
                            },
                            shared.AppscopeConfigTags{
                                Key: "nobis",
                                Value: "dolores",
                            },
                        },
                    },
                    Env: cribl.String("quis"),
                    Hostname: cribl.String("mealy-kilometer.com"),
                    Procname: cribl.String("quis"),
                    Username: cribl.String("Cody17"),
                },
                shared.AppscopeCustom{
                    Ancestor: cribl.String("minus"),
                    Arg: cribl.String("quam"),
                    Config: shared.AppscopeConfig{
                        Cribl: &shared.AppscopeConfigCribl{
                            Authtoken: cribl.String("dolor"),
                            Enable: cribl.Bool(false),
                            Transport: &shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                Host: cribl.String("nostrum"),
                                Path: cribl.String("hic"),
                                Port: cribl.Int64(928082),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("omnis"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("facilis"),
                            },
                            UseScopeSourceTransport: cribl.Bool(false),
                        },
                        Event: &shared.AppscopeConfigEvent{
                            Enable: false,
                            Format: shared.AppscopeConfigEventFormat{
                                Enhancefs: false,
                                Maxeventpersec: 596656,
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                Host: cribl.String("porro"),
                                Path: cribl.String("consequuntur"),
                                Port: cribl.Int64(500026),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("error"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("eaque"),
                            },
                            Type: shared.AppscopeConfigEventTypeNdjson,
                            Watch: []shared.AppscopeConfigEventWatch{
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("rerum"),
                                    Headers: cribl.String("adipisci"),
                                    Name: cribl.String("Merle Gleichner"),
                                    Type: "deleniti",
                                    Value: cribl.String("pariatur"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("provident"),
                                    Headers: cribl.String("nobis"),
                                    Name: cribl.String("Toby Hahn"),
                                    Type: "dolorem",
                                    Value: cribl.String("dolorem"),
                                },
                                shared.AppscopeConfigEventWatch{
                                    Allowbinary: cribl.Bool(false),
                                    Enabled: cribl.Bool(false),
                                    Field: cribl.String("dolor"),
                                    Headers: cribl.String("qui"),
                                    Name: cribl.String("Mindy Marks"),
                                    Type: "dignissimos",
                                    Value: cribl.String("reiciendis"),
                                },
                            },
                        },
                        Libscope: &shared.AppscopeConfigLibscope{
                            Commanddir: cribl.String("amet"),
                            Configevent: cribl.Bool(false),
                            Log: &shared.AppscopeConfigLibscopeLog{
                                Level: shared.AppscopeConfigLibscopeLogLevelError.ToPointer(),
                                Transport: &shared.AppscopeTransport{
                                    Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                                    Host: cribl.String("veritatis"),
                                    Path: cribl.String("ipsa"),
                                    Port: cribl.Int64(56418),
                                    TLS: &shared.AppscopeTransportTLS{
                                        Cacertpath: cribl.String("iure"),
                                        Enable: cribl.Bool(false),
                                        Validateserver: cribl.Bool(false),
                                    },
                                    Type: cribl.String("odio"),
                                },
                            },
                            Summaryperiod: cribl.Int64(311796),
                        },
                        Metric: &shared.AppscopeConfigMetric{
                            Enable: false,
                            Format: shared.AppscopeConfigMetricFormat{
                                Statsdmaxlen: cribl.Int64(881005),
                                Statsdprefix: cribl.String("quidem"),
                                Type: cribl.String("voluptatibus"),
                                Verbosity: cribl.Int64(377752),
                            },
                            Transport: shared.AppscopeTransport{
                                Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                                Host: cribl.String("eos"),
                                Path: cribl.String("atque"),
                                Port: cribl.Int64(24678),
                                TLS: &shared.AppscopeTransportTLS{
                                    Cacertpath: cribl.String("fugiat"),
                                    Enable: cribl.Bool(false),
                                    Validateserver: cribl.Bool(false),
                                },
                                Type: cribl.String("ab"),
                            },
                            Watch: []string{
                                "dolorum",
                                "iusto",
                                "voluptate",
                            },
                        },
                        Payload: &shared.AppscopeConfigPayload{
                            Dir: "dolorum",
                            Enable: false,
                        },
                        Protocol: []shared.AppscopeConfigProtocol{
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 607045,
                                Name: "Kelvin Zboncak",
                                Payload: false,
                                Regex: "voluptate",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 663078,
                                Name: "Mrs. Ray Collins",
                                Payload: false,
                                Regex: "accusamus",
                            },
                            shared.AppscopeConfigProtocol{
                                Binary: false,
                                Detect: false,
                                Len: 320017,
                                Name: "Sam Oberbrunner",
                                Payload: false,
                                Regex: "repellendus",
                            },
                        },
                        Tags: []shared.AppscopeConfigTags{
                            shared.AppscopeConfigTags{
                                Key: "similique",
                                Value: "alias",
                            },
                            shared.AppscopeConfigTags{
                                Key: "at",
                                Value: "quaerat",
                            },
                            shared.AppscopeConfigTags{
                                Key: "tempora",
                                Value: "vel",
                            },
                        },
                    },
                    Env: cribl.String("quod"),
                    Hostname: cribl.String("uneven-commitment.net"),
                    Procname: cribl.String("a"),
                    Username: cribl.String("Jacky.Pfeffer"),
                },
            },
            Event: &shared.AppscopeConfigWithCustomEvent{
                Enable: false,
                Format: shared.AppscopeConfigWithCustomEventFormat{
                    Enhancefs: false,
                    Maxeventpersec: 788740,
                },
                Transport: shared.AppscopeTransport{
                    Buffer: shared.AppscopeTransportBufferFull.ToPointer(),
                    Host: cribl.String("amet"),
                    Path: cribl.String("tempore"),
                    Port: cribl.Int64(880298),
                    TLS: &shared.AppscopeTransportTLS{
                        Cacertpath: cribl.String("numquam"),
                        Enable: cribl.Bool(false),
                        Validateserver: cribl.Bool(false),
                    },
                    Type: cribl.String("enim"),
                },
                Type: shared.AppscopeConfigWithCustomEventTypeNdjson,
                Watch: []shared.AppscopeConfigWithCustomEventWatch{
                    shared.AppscopeConfigWithCustomEventWatch{
                        Allowbinary: cribl.Bool(false),
                        Enabled: cribl.Bool(false),
                        Field: cribl.String("sapiente"),
                        Headers: cribl.String("totam"),
                        Name: cribl.String("Karen Rath"),
                        Type: "vel",
                        Value: cribl.String("libero"),
                    },
                },
            },
            Libscope: &shared.AppscopeConfigWithCustomLibscope{
                Commanddir: cribl.String("voluptas"),
                Configevent: cribl.Bool(false),
                Log: &shared.AppscopeConfigWithCustomLibscopeLog{
                    Level: shared.AppscopeConfigWithCustomLibscopeLogLevelError.ToPointer(),
                    Transport: &shared.AppscopeTransport{
                        Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                        Host: cribl.String("ipsum"),
                        Path: cribl.String("incidunt"),
                        Port: cribl.Int64(186458),
                        TLS: &shared.AppscopeTransportTLS{
                            Cacertpath: cribl.String("cupiditate"),
                            Enable: cribl.Bool(false),
                            Validateserver: cribl.Bool(false),
                        },
                        Type: cribl.String("maxime"),
                    },
                },
                Summaryperiod: cribl.Int64(863856),
            },
            Metric: &shared.AppscopeConfigWithCustomMetric{
                Enable: false,
                Format: shared.AppscopeConfigWithCustomMetricFormat{
                    Statsdmaxlen: cribl.Int64(747080),
                    Statsdprefix: cribl.String("dicta"),
                    Type: cribl.String("laborum"),
                    Verbosity: cribl.Int64(517379),
                },
                Transport: shared.AppscopeTransport{
                    Buffer: shared.AppscopeTransportBufferLine.ToPointer(),
                    Host: cribl.String("aspernatur"),
                    Path: cribl.String("dolores"),
                    Port: cribl.Int64(716860),
                    TLS: &shared.AppscopeTransportTLS{
                        Cacertpath: cribl.String("facilis"),
                        Enable: cribl.Bool(false),
                        Validateserver: cribl.Bool(false),
                    },
                    Type: cribl.String("aliquid"),
                },
                Watch: []string{
                    "molestias",
                    "temporibus",
                },
            },
            Payload: &shared.AppscopeConfigWithCustomPayload{
                Dir: "qui",
                Enable: false,
            },
            Protocol: []shared.AppscopeConfigWithCustomProtocol{
                shared.AppscopeConfigWithCustomProtocol{
                    Binary: false,
                    Detect: false,
                    Len: 144847,
                    Name: "Courtney Cassin",
                    Payload: false,
                    Regex: "hic",
                },
            },
            Tags: []shared.AppscopeConfigWithCustomTags{
                shared.AppscopeConfigWithCustomTags{
                    Key: "cumque",
                    Value: "soluta",
                },
            },
        },
        Description: "nobis",
        ID: "1e31b8b9-0f34-443a-9108-e0adcf4b9218",
        Lib: shared.CriblLibCriblCustom,
        Tags: cribl.String("occaecati"),
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.AppscopeLibEntry != nil {
        // handle response
    }
}

Available Resources and Operations

AppscopeConfigs

Auth

  • IDPlogout - Accepts a logout request from an IDP and logs out the user
  • AcceptIDPRequest - Accepts an authentication request from an IDP and authenticates the user
  • Get - Get IDP used for an authorization code callback
  • GetMetadata - Obtain metadata which Cribl Stream/Edge uses when acting as a Service Provider
  • GetRedirect - Obtain redirect information
  • ListAuthGroup - List the external authentication system's groups
  • Login - Log in and obtain Auth token
  • Logout - Log current user out
  • LogoutRedirect - Redirect user to IDP with logout request
  • Post - API call that the IDP should use for an authentication request
  • RequestLogout - API call that the IDP should use for a logout request

Authorize

Certificates

Changelog

Clui

Collectors

Conditions

DatabaseConnections

  • TestDatabaseConnection - Test a database connection given a type and connectionString
  • Delete - Delete DatabaseConnectionConfig
  • Get - Get DatabaseConnectionConfig by ID
  • ListDatabaseConnection - Get a list of DatabaseConnection objects
  • Post - Create DatabaseConnectionConfig
  • Update - Update DatabaseConnectionConfig

Datasets

Diag

Distributed

  • Get - Get summary of Distributed deployment
  • ListDiagBundles - Get list of existing diag bundles

Edge

EdgeContainers

  • Get - Get details for a single container on the edge host. Add stream=true to get a stream instead.
  • ListContainerDetail - Get a detailed list of containers running on the edge host.

EdgeEvents

EdgeFiles

EdgeLs

EdgeProcesses

EventBreakerRules

  • Delete - Delete Event Breaker Ruleset
  • Get - Get Event Breaker Ruleset by ID
  • ListEventBreaker - Get a list of Event Breaker Ruleset objects
  • Post - Create Event Breaker Ruleset
  • Update - Update Event Breaker Ruleset

Events

  • ListEvents - Get events generated by a specified source

Executors

Expressions

  • Post - Evaluate JavaScript expression

Features

FileSampler

  • ListBytes - Get some number of bytes from the file at the given path

FleetMappings

Functions

Git

  • CountFiles - get the count of files of changed
  • Create - create a new commit containing the current configs the given log message describing the changes.
  • Get - Get info about versioning availability
  • GetLogandTextualDiff - get the log message and textual diff for given commit
  • GetTextualDiff - get the textual diff for given commit
  • GetWorkingTree - get the the working tree status
  • ListBranches - get the list of branches
  • ListChangedFiles - get the files changed
  • ListGitSettings - Get git settings
  • Push - push the current configs to the remote repository.
  • Sync - syncs with remote repo via POST requests
  • Update - Update git settings

GlobalVariables

  • Delete - Delete Global Variable
  • Get - Get Global Variable by ID
  • ListGlobalVariable - Get a list of Global Variable objects
  • Post - Create Global Variable
  • Update - Update Global Variable

Grokfiles

Groups

  • Create - Create ConfigGroup
  • Delete - Delete ConfigGroup
  • Deploy - Deploy commits for a Fleet or Worker Group
  • Get - Get a specific ConfigGroup object
  • GetConfigVersion - Get effective bundle version for given Group
  • ListGroups - Get a list of ConfigGroup objects
  • Update - Update ConfigGroup

Health

  • Get - Provides health info for REST server

Jobs

  • Cancel - Cancel a job by instance id
  • Delete - Remove job from job inspector by instance id
  • Get - Get job info by instance id
  • GetError - Get Task errors for a job by id
  • GetResult - Get results for a discover job by instance id
  • ListJobInfos - Get info on jobs
  • ListJobResults - Get results for a discover job by instance id
  • ListTaskErrors - Get Task errors for a job by id
  • PauseJob - Pause a job by instance id
  • Prevent - prevent job from being deleted automatically
  • Resume - Resume a job by instance id
  • RunJob - Run or schedule a job

Keys

Licenses

Logger

Logging

Lookups

Mappings

Messages

Metrics

  • Aggregate - Aggregate raw internal system metrics
  • Post - Enumerate all internal system metrics
  • Query - Query raw internal system metrics

NotificationTargets

Outputs

  • Create - Create Output
  • Delete - Delete Output
  • DeletePQ - Delete destination persistent queue
  • Get - Get Output by ID
  • GetLatestPQ - Get status of latest clear PQ job for an output
  • GetSamples - Get samples data for the specified output. Used to get sample data for the test action.
  • GetStatus - Get OutputStatus by ID
  • ListOutputObjects - Get a list of Output objects
  • ListOutputStatus - Get a list of OutputStatus objects
  • Post - Send sample data to an output to validate configuration or test connectivity
  • Update - Update Output

Packs

Parquetschemas

Parsers

Pipelines

Policies

Preview

Processes

Profiler

Regexes

Roles

Routes

  • Get - List all routes by id
  • ListRouteLists - List all routes
  • Update - Add, delete or update the routes with the required content.

Samples

SavedJobs

SavedQueries

Schemas

Scripts

Secrets

Security

System

TrustPolicies

UIState

  • Get - Get UI state by key
  • Update - Update UI state by key

Users

Versioning

  • CountFiles - get the count of files of changed
  • Create - create a new commit containing the current configs the given log message describing the changes.
  • Get - Get info about versioning availability
  • GetLogandTextualDiff - get the log message and textual diff for given commit
  • GetTextualDiff - get the textual diff for given commit
  • GetWorkingTree - get the the working tree status
  • ListBranches - get the list of branches
  • ListChangedFiles - get the files changed
  • Push - push the current configs to the remote repository.
  • Sync - syncs with remote repo via POST requests

Workers

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!

SDK Created by Speakeasy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerList = []string{
	"https://logstream.{organizationID}.cribl.cloud/",
}

ServerList contains the list of servers available to the SDK

Functions

func Bool

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func String

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type Cribl

type Cribl struct {
	AppscopeConfigs *appscopeConfigs
	// Auth - Actions related to authentication. Do not use the /auth endpoints in Cribl.Cloud deployments. Instead, obtain a Bearer token as described here: https://docs.cribl.io/stream/api-tutorials/#criblcloud-free-tier
	Auth      *auth
	Authorize *authorize
	// Certificates - Actions related to certificates
	Certificates *certificates
	Changelog    *changelog
	Clui         *clui
	// Collectors - Actions related to collectors
	Collectors          *collectors
	Conditions          *conditions
	DatabaseConnections *databaseConnections
	Datasets            *datasets
	// Diag - Actions related to diagnostics
	Diag        *diag
	Distributed *distributed
	// Edge - Actions enabled in Edge mode
	Edge           *edge
	EdgeContainers *edgeContainers
	EdgeEvents     *edgeEvents
	EdgeFiles      *edgeFiles
	EdgeLs         *edgeLs
	EdgeProcesses  *edgeProcesses
	// EventBreakerRules - Actions related to event breaker rules
	EventBreakerRules *eventBreakerRules
	Events            *events
	// Executors - Actions related to executors
	Executors *executors
	// Expressions - Actions related to expressions
	Expressions   *expressions
	Features      *features
	FileSampler   *fileSampler
	FleetMappings *fleetMappings
	// Functions - Actions related to functions
	Functions       *functions
	Git             *git
	GlobalVariables *globalVariables
	Grokfiles       *grokfiles
	Groups          *groups
	// Health - Actions related to REST server health
	Health *health
	Jobs   *jobs
	// Keys - Actions related to encryption keys
	Keys *keys
	// Licenses - Actions related to licenses. The <code>/licenses</code> endpoints do not apply to Cribl.Cloud deployments.
	Licenses *licenses
	Logger   *logger
	// Logging - Actions related to logging
	Logging *logging
	// Lookups - Actions related to lookups
	Lookups  *lookups
	Mappings *mappings
	// Messages - Actions related to messages
	Messages *messages
	// Metrics - Actions related to metrics
	Metrics             *metrics
	NotificationTargets *notificationTargets
	// Outputs - Actions related to outputs
	Outputs        *outputs
	Packs          *packs
	Parquetschemas *parquetschemas
	// Parsers - Actions related to parsers
	Parsers *parsers
	// Pipelines - Actions related to pipelines
	Pipelines *pipelines
	Policies  *policies
	// Preview - Actions related to data preview
	Preview   *preview
	Processes *processes
	Profiler  *profiler
	// Regexes - Actions related to regular expressions
	Regexes *regexes
	Roles   *roles
	// Routes - Actions related to routes
	Routes *routes
	// Samples - Actions related to samples
	Samples      *samples
	SavedJobs    *savedJobs
	SavedQueries *savedQueries
	Schemas      *schemas
	// Scripts - Actions related to scripts
	Scripts *scripts
	// Search - Actions related to search
	Search   *search
	Secrets  *secrets
	Security *security
	// System - Actions related to system settings
	System        *system
	TrustPolicies *trustPolicies
	UIState       *uiState
	// Users - Actions related to users
	Users      *users
	Versioning *versioning
	// Workers - Actions related to workers
	Workers *workers
	// contains filtered or unexported fields
}

Cribl - Cribl API Reference: This API Reference lists available REST endpoints, along with their supported operations for accessing, creating, updating, or deleting resources. See our complementary product documentation at [docs.cribl.io](http://docs.cribl.io).

func New

func New(opts ...SDKOption) *Cribl

New creates a new instance of the SDK with the provided options

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type SDKOption

type SDKOption func(*Cribl)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithOrganizationID

func WithOrganizationID(organizationID string) SDKOption

WithOrganizationID allows setting the $name variable for url substitution

func WithSecurity

func WithSecurity(security shared.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithServerIndex

func WithServerIndex(serverIndex int) SDKOption

WithServerIndex allows the overriding of the default server by index

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL