logtypesapi

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Code generated by apigen; DO NOT EDIT. package logtypesapi documents github.com/panther-labs/panther/internal/core/logtypesapi.LogTypesAPI

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelCustomLogInput added in v1.15.0

type DelCustomLogInput struct {
	LogType  string `json:"logType" validate:"required,startswith=Custom." description:"The log type id"`
	Revision int64  `json:"revision" validate:"min=1" description:"Log record revision"`
}

type DelCustomLogResponse added in v1.15.0

type DelCustomLogResponse struct {
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"The delete record"`
}

type GetCustomLogInput added in v1.15.0

type GetCustomLogInput struct {
	LogType string `json:"logType" validate:"required,startswith=Custom." description:"The log type id"`
}

type GetCustomLogResponse added in v1.15.0

type GetCustomLogResponse struct {
	Result struct {
		Name         string    `json:"logType" dynamodbav:"logType" validate:"required" description:"The schema id"`
		Revision     int64     `json:"revision" validate:"required,min=1" description:"Schema record revision"`
		Release      string    `json:"release,omitempty" description:"Managed schema release version"`
		UpdatedAt    time.Time `json:"updatedAt" description:"Last update timestamp of the record"`
		CreatedAt    time.Time `json:"createdAt" description:"Creation timestamp of the record"`
		Managed      bool      `json:"managed,omitempty" description:"Schema is managed by Panther"`
		Disabled     bool      `json:"disabled,omitempty" dynamodbav:"IsDeleted"  description:"Log record is deleted"`
		Description  string    `json:"description" description:"Log type description"`
		ReferenceURL string    `json:"referenceURL" description:"A URL with reference docs for the schema"`
		Spec         string    `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
	} `json:"record,omitempty" description:"The custom log record (field omitted if an error occurred)"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred while fetching the record"`
}

type GetSchemaInput added in v1.16.0

type GetSchemaInput struct {
	Name string `json:"name" validate:"required" description:"The schema id"`
}

type GetSchemaResponse added in v1.16.0

type GetSchemaResponse struct {
	Record struct {
		Name         string    `json:"logType" dynamodbav:"logType" validate:"required" description:"The schema id"`
		Revision     int64     `json:"revision" validate:"required,min=1" description:"Schema record revision"`
		Release      string    `json:"release,omitempty" description:"Managed schema release version"`
		UpdatedAt    time.Time `json:"updatedAt" description:"Last update timestamp of the record"`
		CreatedAt    time.Time `json:"createdAt" description:"Creation timestamp of the record"`
		Managed      bool      `json:"managed,omitempty" description:"Schema is managed by Panther"`
		Disabled     bool      `json:"disabled,omitempty" dynamodbav:"IsDeleted"  description:"Log record is deleted"`
		Description  string    `json:"description" description:"Log type description"`
		ReferenceURL string    `json:"referenceURL" description:"A URL with reference docs for the schema"`
		Spec         string    `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
	} `json:"record,omitempty" description:"The schema record (field omitted if an error occurred)"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred while fetching the record"`
}

type ListAvailableLogTypesResponse

type ListAvailableLogTypesResponse struct {
	LogTypes []string `json:"logTypes"`
}

type ListCustomLogsResponse added in v1.15.0

type ListCustomLogsResponse struct {
	Records []struct {
		Name         string    `json:"logType" dynamodbav:"logType" validate:"required" description:"The schema id"`
		Revision     int64     `json:"revision" validate:"required,min=1" description:"Schema record revision"`
		Release      string    `json:"release,omitempty" description:"Managed schema release version"`
		UpdatedAt    time.Time `json:"updatedAt" description:"Last update timestamp of the record"`
		CreatedAt    time.Time `json:"createdAt" description:"Creation timestamp of the record"`
		Managed      bool      `json:"managed,omitempty" description:"Schema is managed by Panther"`
		Disabled     bool      `json:"disabled,omitempty" dynamodbav:"IsDeleted"  description:"Log record is deleted"`
		Description  string    `json:"description" description:"Log type description"`
		ReferenceURL string    `json:"referenceURL" description:"A URL with reference docs for the schema"`
		Spec         string    `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
	} `json:"customLogs" description:"Custom log records stored"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred during the operation"`
}

type ListDeletedCustomLogsResponse added in v1.15.0

type ListDeletedCustomLogsResponse struct {
	LogTypes []string `json:"logTypes,omitempty" description:"A list of ids of deleted log types (omitted if an error occurred)"`
	Error    struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred while fetching the list"`
}

type ListManagedSchemaUpdatesInput added in v1.16.0

type ListManagedSchemaUpdatesInput struct{}

type ListManagedSchemaUpdatesResponse added in v1.16.0

type ListManagedSchemaUpdatesResponse struct {
	Releases []struct {
		Tag         string `json:"tag"`
		Description string `json:"description"`
		ManifestURL string `json:"manifestURL"`
	} `json:"releases,omitempty" description:"Available release updates"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred while fetching the record"`
}

type LogTypesAPI

type LogTypesAPI interface {
	ListAvailableLogTypes() (ListAvailableLogTypesResponse, error)

	ListDeletedCustomLogs() (ListDeletedCustomLogsResponse, error)

	GetCustomLog(input GetCustomLogInput) (GetCustomLogResponse, error)

	PutCustomLog(input PutCustomLogInput) (PutCustomLogResponse, error)

	DelCustomLog(input DelCustomLogInput) (DelCustomLogResponse, error)

	ListCustomLogs() (ListCustomLogsResponse, error)

	ListManagedSchemaUpdates(input ListManagedSchemaUpdatesInput) (ListManagedSchemaUpdatesResponse, error)

	UpdateManagedSchemas(input UpdateManagedSchemasInput) (UpdateManagedSchemasResponse, error)

	GetSchema(input GetSchemaInput) (GetSchemaResponse, error)
}

LogTypesAPI available endpoints

type LogTypesAPIPayload

type LogTypesAPIPayload struct {
	ListAvailableLogTypes    *struct{}
	ListDeletedCustomLogs    *struct{}
	GetCustomLog             *GetCustomLogInput
	PutCustomLog             *PutCustomLogInput
	DelCustomLog             *DelCustomLogInput
	ListCustomLogs           *struct{}
	ListManagedSchemaUpdates *ListManagedSchemaUpdatesInput
	UpdateManagedSchemas     *UpdateManagedSchemasInput
	GetSchema                *GetSchemaInput
}

LogTypesAPIPayload is the payload for calls to LogTypesAPI endpoints.

type PutCustomLogInput added in v1.15.0

type PutCustomLogInput struct {
	LogType      string `json:"logType" validate:"required,startswith=Custom." description:"The log type id"`
	Revision     int64  `` /* 145-byte string literal not displayed */
	Description  string `json:"description" description:"Log type description"`
	ReferenceURL string `json:"referenceURL" description:"A URL with reference docs for the schema"`
	Spec         string `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
}

type PutCustomLogResponse added in v1.15.0

type PutCustomLogResponse struct {
	Result struct {
		Name         string    `json:"logType" dynamodbav:"logType" validate:"required" description:"The schema id"`
		Revision     int64     `json:"revision" validate:"required,min=1" description:"Schema record revision"`
		Release      string    `json:"release,omitempty" description:"Managed schema release version"`
		UpdatedAt    time.Time `json:"updatedAt" description:"Last update timestamp of the record"`
		CreatedAt    time.Time `json:"createdAt" description:"Creation timestamp of the record"`
		Managed      bool      `json:"managed,omitempty" description:"Schema is managed by Panther"`
		Disabled     bool      `json:"disabled,omitempty" dynamodbav:"IsDeleted"  description:"Log record is deleted"`
		Description  string    `json:"description" description:"Log type description"`
		ReferenceURL string    `json:"referenceURL" description:"A URL with reference docs for the schema"`
		Spec         string    `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
	} `json:"record,omitempty" description:"The modified record (field is omitted if an error occurred)"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred during the operation"`
}

type UpdateManagedSchemasInput added in v1.16.0

type UpdateManagedSchemasInput struct {
	Release     string `json:"release" validate:"required" description:"The release of the schema"`
	ManifestURL string `json:"manifestURL,omitempty" validate:"omitempty,url" description:"The URL to download the manifest archive from"`
}

type UpdateManagedSchemasResponse added in v1.16.0

type UpdateManagedSchemasResponse struct {
	Records []struct {
		Name         string    `json:"logType" dynamodbav:"logType" validate:"required" description:"The schema id"`
		Revision     int64     `json:"revision" validate:"required,min=1" description:"Schema record revision"`
		Release      string    `json:"release,omitempty" description:"Managed schema release version"`
		UpdatedAt    time.Time `json:"updatedAt" description:"Last update timestamp of the record"`
		CreatedAt    time.Time `json:"createdAt" description:"Creation timestamp of the record"`
		Managed      bool      `json:"managed,omitempty" description:"Schema is managed by Panther"`
		Disabled     bool      `json:"disabled,omitempty" dynamodbav:"IsDeleted"  description:"Log record is deleted"`
		Description  string    `json:"description" description:"Log type description"`
		ReferenceURL string    `json:"referenceURL" description:"A URL with reference docs for the schema"`
		Spec         string    `json:"logSpec" dynamodbav:"logSpec" validate:"required" description:"The schema spec in YAML or JSON format"`
	} `json:"records"`
	Error struct {
		Code    string `json:"code" validate:"required"`
		Message string `json:"message" validate:"required"`
	} `json:"error,omitempty" description:"An error that occurred while fetching the record"`
}

Jump to

Keyboard shortcuts

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