ocilogging

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 36 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OCI Logging

Parity grade: B · SDK github.com/oracle/oci-go-sdk/v65@v65.126.2 · last audited 2026-10-29 (ee4983645)

Coverage

Metric Value
PARITY entries audited 32 (27 ok, 5 partial)
Feature families 9 (6 ok, 3 partial)
Known gaps 2
Deferred items 0
Resource leaks unknown
Known gaps
  • Object Storage read and write access logs are not emitted: access entries need request-level facts (client address, user agent, status, requestAction) that only the HTTP handler of services/ociobjectstorage sees, and that service has no access-log hook (only object and bucket events, events.go:63 and :32). Entry shape: Logging reference details_for_object_storage.
  • IAM policy checks, resource principals and instance principals are not applied; only API-key signatures are verified (out of scope: IAM evaluation).

More

Documentation

Index

Constants

View Source
const DefaultPort = 8160

DefaultPort is the dedicated listener's default TCP port.

View Source
const (
	// Region is the fixed region baked into emulated OCIDs.
	Region = "us-ashburn-1"
)

Variables

View Source
var ErrNilAppContext = errors.New("ocilogging: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

View Source
var ErrSnapshotNull = errors.New("ocilogging: null entry in snapshot")

ErrSnapshotNull is returned when a snapshot contains a null entry.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    string
	Message string
	Status  int
}

APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.

func (*APIError) Error

func (e *APIError) Error() string

type AgentConfig

type AgentConfig struct {
	TimeCreated   time.Time      `json:"timeCreated"`
	TimeModified  time.Time      `json:"timeModified"`
	TransitionAt  *time.Time     `json:"transitionAt,omitempty"`
	ServiceConfig jsontext.Value `json:"serviceConfiguration"`
	Tags          Tags           `json:"tags"`
	ID            string         `json:"id"`
	CompartmentID string         `json:"compartmentId"`
	Name          string         `json:"displayName"`
	Description   string         `json:"description,omitempty"`
	State         string         `json:"state"`
	ConfigType    string         `json:"configurationType"`
	Etag          string         `json:"etag"`
	Groups        []string       `json:"groupList,omitempty"`
	Seq           int64          `json:"seq"`
	Enabled       bool           `json:"isEnabled"`
}

AgentConfig is a stored unified agent configuration.

type AgentConfigWire

type AgentConfigWire struct {
	TimeCreated        time.Time                 `json:"timeCreated"`
	TimeModified       time.Time                 `json:"timeLastModified"`
	FreeformTags       map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags        map[string]map[string]any `json:"definedTags,omitempty"`
	ID                 string                    `json:"id"`
	CompartmentID      string                    `json:"compartmentId"`
	Name               string                    `json:"displayName"`
	Description        string                    `json:"description,omitempty"`
	LifecycleState     string                    `json:"lifecycleState"`
	ConfigurationState string                    `json:"configurationState"`
	GroupAssociation   groupAssociationWire      `json:"groupAssociation"`
	ServiceConfig      jsontext.Value            `json:"serviceConfiguration"`
	Enabled            bool                      `json:"isEnabled"`
}

AgentConfigWire is the GetUnifiedAgentConfiguration response.

type AgentFilter

type AgentFilter struct {
	Compartment, Name, State, LogID, GroupID string
	Subtree                                  bool
}

AgentFilter narrows ListUnifiedAgentConfigurations.

type ChangeLogGroupIn

type ChangeLogGroupIn struct {
	TargetLogGroupID string `json:"targetLogGroupId"`
}

ChangeLogGroupIn is the ChangeLogLogGroup request body.

type ConfigProvider

type ConfigProvider interface {
	GetOCILoggingSettings() Settings
}

ConfigProvider extracts OCI Logging configuration from the AppContext Config.

type ConfigWire

type ConfigWire struct {
	Source        *SourceWire    `json:"source,omitempty"`
	Archiving     *archivingWire `json:"archiving,omitempty"`
	CompartmentID string         `json:"compartmentId,omitempty"`
}

ConfigWire is the log configuration as sent and returned over the wire.

type CreateAgentConfigIn

type CreateAgentConfigIn struct {
	Tags
	RetryToken    string                `json:"-"`
	Enabled       *bool                 `json:"isEnabled"`
	Description   *string               `json:"description"`
	GroupAssoc    *groupAssociationWire `json:"groupAssociation"`
	Name          string                `json:"displayName"`
	Compartment   string                `json:"compartmentId"`
	ServiceConfig jsontext.Value        `json:"serviceConfiguration"`
}

CreateAgentConfigIn is the CreateUnifiedAgentConfiguration request body.

type CreateLogGroupIn

type CreateLogGroupIn struct {
	Tags
	RetryToken  string  `json:"-"`
	Description *string `json:"description"`
	Name        string  `json:"displayName"`
	Compartment string  `json:"compartmentId"`
}

CreateLogGroupIn is the CreateLogGroup request body.

type CreateLogIn

type CreateLogIn struct {
	Tags
	RetryToken    string      `json:"-"`
	Enabled       *bool       `json:"isEnabled"`
	Retention     *int        `json:"retentionDuration"`
	Configuration *ConfigWire `json:"configuration"`
	Name          string      `json:"displayName"`
	LogType       string      `json:"logType"`
}

CreateLogIn is the CreateLog request body.

type CreateSavedSearchIn

type CreateSavedSearchIn struct {
	Tags
	RetryToken  string  `json:"-"`
	Description *string `json:"description"`
	Name        string  `json:"name"`
	Query       string  `json:"query"`
	Compartment string  `json:"compartmentId"`
}

CreateSavedSearchIn is the CreateLogSavedSearch request body.

type Entry

type Entry struct {
	Time     time.Time `json:"time"`
	Ingested time.Time `json:"ingested"`
	ID       string    `json:"id"`
	Data     string    `json:"data"`
	Source   string    `json:"source"`
	Type     string    `json:"type"`
	Subject  string    `json:"subject,omitempty"`
	Seq      int64     `json:"seq"`
}

Entry is one ingested log record.

type Handler

type Handler struct {
	Backend *InMemoryBackend

	Port        int
	EnforceAuth bool
	// contains filtered or unexported fields
}

Handler serves OCI Logging: control plane, ingestion and search.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation returns the operation name for metrics.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the addressed resource id for metrics.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations lists the supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler for all OCILogging requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority is irrelevant because RouteMatcher never matches.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all in-memory state.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher never matches: OCILogging runs on its own listener.

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context)

Shutdown stops the listener and the sweeper.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker binds the dedicated listener synchronously so a port conflict is returned to the caller.

func (*Handler) Trusted

func (h *Handler) Trusted() echo.HandlerFunc

Trusted returns a handler that skips request-signature verification, for the in-process dashboard proxy.

type InMemoryBackend

type InMemoryBackend struct {
	Auth *ociauth.Registry
	// contains filtered or unexported fields
}

InMemoryBackend holds every log group, log, agent configuration, work request and ingested entry under one lock.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates an empty backend.

func (*InMemoryBackend) ChangeAgentConfigCompartment

func (b *InMemoryBackend) ChangeAgentConfigCompartment(id, ifMatch, compartment, token string) (string, error)

ChangeAgentConfigCompartment moves an agent configuration to another compartment.

func (*InMemoryBackend) ChangeLogGroupCompartment

func (b *InMemoryBackend) ChangeLogGroupCompartment(id, ifMatch, compartment string) (string, error)

ChangeLogGroupCompartment moves a log group to another compartment.

func (*InMemoryBackend) ChangeLogLogGroup

func (b *InMemoryBackend) ChangeLogLogGroup(groupID, id, ifMatch, target string) (string, error)

ChangeLogLogGroup moves a log to another log group of the same compartment.

func (*InMemoryBackend) ChangeSavedSearchCompartment

func (b *InMemoryBackend) ChangeSavedSearchCompartment(id, ifMatch, compartment string) error

ChangeSavedSearchCompartment moves a saved search to another compartment.

func (*InMemoryBackend) Compartments

func (b *InMemoryBackend) Compartments() []string

Compartments lists the distinct compartments that hold log groups.

func (*InMemoryBackend) CreateAgentConfig

func (b *InMemoryBackend) CreateAgentConfig(in CreateAgentConfigIn) (string, error)

CreateAgentConfig creates a unified agent configuration.

func (*InMemoryBackend) CreateLog

func (b *InMemoryBackend) CreateLog(groupID string, in CreateLogIn) (string, error)

CreateLog creates a log inside a log group.

func (*InMemoryBackend) CreateLogGroup

func (b *InMemoryBackend) CreateLogGroup(in CreateLogGroupIn) (string, error)

CreateLogGroup creates a log group in CREATING state and returns its work request.

func (*InMemoryBackend) CreateSavedSearch

func (b *InMemoryBackend) CreateSavedSearch(in CreateSavedSearchIn) (SavedSearchWire, string, error)

CreateSavedSearch stores a saved search; it is ACTIVE immediately.

func (*InMemoryBackend) DeleteAgentConfig

func (b *InMemoryBackend) DeleteAgentConfig(id, ifMatch string) (string, error)

DeleteAgentConfig moves an agent configuration to DELETING.

func (*InMemoryBackend) DeleteLog

func (b *InMemoryBackend) DeleteLog(groupID, id, ifMatch string) (string, error)

DeleteLog moves a log to DELETING; its entries are dropped when the transition completes.

func (*InMemoryBackend) DeleteLogGroup

func (b *InMemoryBackend) DeleteLogGroup(id, ifMatch string) (string, error)

DeleteLogGroup moves an empty log group to DELETING.

func (*InMemoryBackend) DeleteSavedSearch

func (b *InMemoryBackend) DeleteSavedSearch(id, ifMatch string) error

DeleteSavedSearch removes a saved search.

func (*InMemoryBackend) DeleteWorkRequest

func (b *InMemoryBackend) DeleteWorkRequest(id string) error

DeleteWorkRequest removes a finished work request.

func (*InMemoryBackend) EmitServiceLog

func (b *InMemoryBackend) EmitServiceLog(service, resource, category string, ev ServiceEvent) int

EmitServiceLog stores the event in every ACTIVE SERVICE log whose source matches; it returns how many logs took it.

func (*InMemoryBackend) GetAgentConfig

func (b *InMemoryBackend) GetAgentConfig(id string) (AgentConfigWire, string, error)

GetAgentConfig returns one agent configuration and its etag.

func (*InMemoryBackend) GetLog

func (b *InMemoryBackend) GetLog(groupID, id string) (LogWire, string, error)

GetLog returns one log and its etag.

func (*InMemoryBackend) GetLogGroup

func (b *InMemoryBackend) GetLogGroup(id string) (LogGroupWire, string, error)

GetLogGroup returns one log group and its etag.

func (*InMemoryBackend) GetSavedSearch

func (b *InMemoryBackend) GetSavedSearch(id string) (SavedSearchWire, string, error)

GetSavedSearch returns one saved search and its etag.

func (*InMemoryBackend) GetWorkRequest

func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)

GetWorkRequest returns one work request.

func (*InMemoryBackend) ListAgentConfigs

func (b *InMemoryBackend) ListAgentConfigs(f AgentFilter, o ListOpts) (page.Page[agentSummaryWire], error)

ListAgentConfigs lists the agent configurations of a compartment.

func (*InMemoryBackend) ListLogGroups

func (b *InMemoryBackend) ListLogGroups(compartment, name string, o ListOpts) (page.Page[LogGroupWire], error)

ListLogGroups lists the log groups of a compartment.

func (*InMemoryBackend) ListLogGroupsIn

func (b *InMemoryBackend) ListLogGroupsIn(
	compartment, name string, subtree bool, o ListOpts,
) (page.Page[LogGroupWire], error)

ListLogGroupsIn lists the log groups of a compartment, and of its nested compartments when subtree is set.

func (*InMemoryBackend) ListLogs

func (b *InMemoryBackend) ListLogs(groupID string, f LogFilter, o ListOpts) (page.Page[LogWire], error)

ListLogs lists the logs of a log group.

func (*InMemoryBackend) ListSavedSearches

func (b *InMemoryBackend) ListSavedSearches(
	compartment, id, name string, o ListOpts,
) (page.Page[SavedSearchWire], error)

ListSavedSearches lists the saved searches of a compartment.

func (*InMemoryBackend) ListServices

func (b *InMemoryBackend) ListServices(o ListOpts) page.Page[ServiceSummaryWire]

ListServices returns the service catalog.

func (*InMemoryBackend) ListWorkRequests

func (b *InMemoryBackend) ListWorkRequests(
	compartment, id, status string, o ListOpts,
) (page.Page[WorkRequestWire], error)

ListWorkRequests lists the work requests of a compartment.

func (*InMemoryBackend) PutLogs

func (b *InMemoryBackend) PutLogs(logID string, in PutLogsIn) error

PutLogs stores the batches in an ACTIVE, enabled log.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a snapshot.

func (*InMemoryBackend) SearchLogs

func (b *InMemoryBackend) SearchLogs(in SearchIn, token string, limit int) (SearchOut, string, error)

SearchLogs runs a query over the ingested entries within the time range.

func (*InMemoryBackend) SetClock

func (b *InMemoryBackend) SetClock(now func() time.Time)

SetClock injects the time source used for lifecycle, timestamps and retention.

func (*InMemoryBackend) SetCompartmentTree

func (b *InMemoryBackend) SetCompartmentTree(within func(id, ancestor string) bool)

SetCompartmentTree wires isCompartmentIdInSubtree matching against the compartment hierarchy (OCI Identity).

func (*InMemoryBackend) SetTagLookup

func (b *InMemoryBackend) SetTagLookup(fn ocitags.Lookup)

SetTagLookup wires defined-tag validation against a tag namespace source (OCI Identity); nil accepts any namespace.

func (*InMemoryBackend) SetTransition

func (b *InMemoryBackend) SetTransition(d time.Duration)

SetTransition sets how long CREATING, UPDATING and DELETING states last.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state, including registered API keys.

func (*InMemoryBackend) Sweep

func (b *InMemoryBackend) Sweep()

Sweep applies lifecycle transitions and retention against the backend clock.

func (*InMemoryBackend) UpdateAgentConfig

func (b *InMemoryBackend) UpdateAgentConfig(id, ifMatch string, in UpdateAgentConfigIn) (string, error)

UpdateAgentConfig replaces the mutable fields of an agent configuration.

func (*InMemoryBackend) UpdateLog

func (b *InMemoryBackend) UpdateLog(groupID, id, ifMatch string, in UpdateLogIn) (string, error)

UpdateLog changes the mutable fields of a log; it passes through UPDATING.

func (*InMemoryBackend) UpdateLogGroup

func (b *InMemoryBackend) UpdateLogGroup(id, ifMatch string, in UpdateLogGroupIn) (string, error)

UpdateLogGroup changes the mutable fields of a log group; it passes through UPDATING.

func (*InMemoryBackend) UpdateSavedSearch

func (b *InMemoryBackend) UpdateSavedSearch(
	id, ifMatch string,
	in UpdateSavedSearchIn,
) (SavedSearchWire, string, error)

UpdateSavedSearch changes the mutable fields of a saved search.

func (*InMemoryBackend) WorkRequestExists

func (b *InMemoryBackend) WorkRequestExists(id string) error

WorkRequestExists reports whether a work request exists (its error list is always empty).

func (*InMemoryBackend) WorkRequestLogs

func (b *InMemoryBackend) WorkRequestLogs(id string, o ListOpts) (page.Page[wrLogWire], error)

WorkRequestLogs returns the log entries of a work request.

type ListOpts

type ListOpts struct {
	SortBy string
	Order  string
	Page   string
	Limit  int
}

ListOpts carries the shared list query parameters.

type Log

type Log struct {
	TimeCreated  time.Time  `json:"timeCreated"`
	TimeModified time.Time  `json:"timeModified"`
	TransitionAt *time.Time `json:"transitionAt,omitempty"`
	Config       *LogConfig `json:"configuration,omitempty"`
	Tags         Tags       `json:"tags"`
	ID           string     `json:"id"`
	GroupID      string     `json:"logGroupId"`
	Name         string     `json:"displayName"`
	LogType      string     `json:"logType"`
	State        string     `json:"state"`
	Etag         string     `json:"etag"`
	Retention    int        `json:"retentionDuration"`
	Seq          int64      `json:"seq"`
	Archived     int64      `json:"archivedEntries,omitempty"`
	Enabled      bool       `json:"isEnabled"`
}

Log is a custom or service log inside a log group.

type LogBatch

type LogBatch struct {
	DefaultTime *time.Time `json:"defaultlogentrytime"`
	Source      *string    `json:"source"`
	Type        *string    `json:"type"`
	Subject     string     `json:"subject"`
	Entries     []LogEntry `json:"entries"`
}

LogBatch is a group of entries sharing a source, type and subject.

type LogConfig

type LogConfig struct {
	Source        *ServiceSource `json:"source,omitempty"`
	Archiving     *bool          `json:"archiving,omitempty"`
	CompartmentID string         `json:"compartmentId,omitempty"`
}

LogConfig is the stored log configuration.

type LogEntry

type LogEntry struct {
	Time *time.Time `json:"time"`
	Data *string    `json:"data"`
	ID   *string    `json:"id"`
}

LogEntry is one entry of a batch.

type LogFilter

type LogFilter struct {
	LogType, Name, State, Service, Resource string
}

LogFilter narrows ListLogs.

type LogGroup

type LogGroup struct {
	TimeCreated   time.Time  `json:"timeCreated"`
	TimeModified  time.Time  `json:"timeModified"`
	TransitionAt  *time.Time `json:"transitionAt,omitempty"`
	Tags          Tags       `json:"tags"`
	ID            string     `json:"id"`
	CompartmentID string     `json:"compartmentId"`
	Name          string     `json:"displayName"`
	Description   string     `json:"description,omitempty"`
	State         string     `json:"state"`
	Etag          string     `json:"etag"`
	Seq           int64      `json:"seq"`
}

LogGroup is a container of logs.

type LogGroupWire

type LogGroupWire struct {
	TimeCreated    time.Time                 `json:"timeCreated"`
	TimeModified   time.Time                 `json:"timeLastModified"`
	FreeformTags   map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags    map[string]map[string]any `json:"definedTags,omitempty"`
	ID             string                    `json:"id"`
	CompartmentID  string                    `json:"compartmentId"`
	Name           string                    `json:"displayName"`
	Description    string                    `json:"description,omitempty"`
	LifecycleState string                    `json:"lifecycleState"`
}

LogGroupWire is the GetLogGroup response and the ListLogGroups item.

type LogWire

type LogWire struct {
	TimeCreated    time.Time                 `json:"timeCreated"`
	TimeModified   time.Time                 `json:"timeLastModified"`
	Configuration  *ConfigWire               `json:"configuration,omitempty"`
	FreeformTags   map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags    map[string]map[string]any `json:"definedTags,omitempty"`
	ID             string                    `json:"id"`
	LogGroupID     string                    `json:"logGroupId"`
	CompartmentID  string                    `json:"compartmentId"`
	Name           string                    `json:"displayName"`
	LogType        string                    `json:"logType"`
	LifecycleState string                    `json:"lifecycleState"`
	Retention      int                       `json:"retentionDuration"`
	Enabled        bool                      `json:"isEnabled"`
}

LogWire is the GetLog response and the ListLogs item.

type Provider

type Provider struct{}

Provider implements service.Provider for OCI Logging. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.

func (*Provider) Init

Init creates the backend and handler; the port is bound in StartWorker.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type PutLogsIn

type PutLogsIn struct {
	SpecVersion string     `json:"specversion"`
	Batches     []LogBatch `json:"logEntryBatches"`
}

PutLogsIn is the PutLogs request body.

type Query

type Query struct {
	Streams []string
	// contains filtered or unexported fields
}

Query is a parsed Logging search.

func ParseQuery

func ParseQuery(src string) (*Query, error)

ParseQuery parses the supported subset of the Logging query language.

type SavedSearch

type SavedSearch struct {
	TimeCreated   time.Time `json:"timeCreated"`
	TimeModified  time.Time `json:"timeModified"`
	Tags          Tags      `json:"tags"`
	ID            string    `json:"id"`
	CompartmentID string    `json:"compartmentId"`
	Name          string    `json:"name"`
	Query         string    `json:"query"`
	Description   string    `json:"description,omitempty"`
	Etag          string    `json:"etag"`
	Seq           int64     `json:"seq"`
}

SavedSearch is a stored log saved search.

type SavedSearchWire

type SavedSearchWire struct {
	TimeCreated    time.Time                 `json:"timeCreated"`
	TimeModified   time.Time                 `json:"timeLastModified"`
	FreeformTags   map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags    map[string]map[string]any `json:"definedTags,omitempty"`
	ID             string                    `json:"id"`
	CompartmentID  string                    `json:"compartmentId"`
	Name           string                    `json:"name"`
	Query          string                    `json:"query"`
	Description    string                    `json:"description,omitempty"`
	LifecycleState string                    `json:"lifecycleState"`
}

SavedSearchWire is the LogSavedSearch response and the summary item.

type SearchIn

type SearchIn struct {
	TimeStart       *time.Time `json:"timeStart"`
	TimeEnd         *time.Time `json:"timeEnd"`
	ReturnFieldInfo *bool      `json:"isReturnFieldInfo"`
	SearchQuery     string     `json:"searchQuery"`
}

SearchIn is the SearchLogs request body.

type SearchOut

type SearchOut struct {
	Results []searchResultWire `json:"results"`
	Fields  []fieldInfoWire    `json:"fields,omitempty"`
	Summary searchSummaryWire  `json:"summary"`
}

SearchOut is the SearchLogs response body.

type ServiceEvent

type ServiceEvent struct {
	Time    time.Time
	Data    map[string]any
	Type    string
	Subject string
}

ServiceEvent is a log record emitted by another emulated OCI service.

type ServiceSource

type ServiceSource struct {
	Parameters map[string]string `json:"parameters,omitempty"`
	Service    string            `json:"service"`
	Resource   string            `json:"resource"`
	Category   string            `json:"category"`
}

ServiceSource is the OCISERVICE source of a SERVICE log.

type ServiceSummaryWire

type ServiceSummaryWire struct {
	ID                   string             `json:"id"`
	Name                 string             `json:"name"`
	Endpoint             string             `json:"endpoint"`
	ServicePrincipalName string             `json:"servicePrincipalName"`
	TenantID             string             `json:"tenantId"`
	Namespace            string             `json:"namespace,omitempty"`
	ResourceTypes        []resourceTypeWire `json:"resourceTypes"`
}

ServiceSummaryWire is one entry of the ListServices catalog.

type Settings

type Settings struct {
	Port int `` //nolint:lll // config struct tags are intentionally verbose
	/* 220-byte string literal not displayed */
	EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
	/* 223-byte string literal not displayed */
}

Settings holds service-level configuration, embedded in the root CLI as CLI.OCILogging.

func DefaultSettings

func DefaultSettings() Settings

DefaultSettings returns the settings used when no ConfigProvider is available.

type SourceWire

type SourceWire struct {
	Parameters map[string]string `json:"parameters,omitempty"`
	SourceType string            `json:"sourceType"`
	Service    string            `json:"service"`
	Resource   string            `json:"resource"`
	Category   string            `json:"category"`
}

type Tags

type Tags struct {
	FreeformTags map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags  map[string]map[string]any `json:"definedTags,omitempty"`
}

Tags are the shared freeform and defined tag sets of a resource.

type UpdateAgentConfigIn

type UpdateAgentConfigIn struct {
	Tags
	Enabled       *bool                 `json:"isEnabled"`
	Description   *string               `json:"description"`
	Name          *string               `json:"displayName"`
	GroupAssoc    *groupAssociationWire `json:"groupAssociation"`
	ServiceConfig jsontext.Value        `json:"serviceConfiguration"`
}

UpdateAgentConfigIn is the UpdateUnifiedAgentConfiguration request body.

type UpdateLogGroupIn

type UpdateLogGroupIn struct {
	Tags
	Name        *string `json:"displayName"`
	Description *string `json:"description"`
}

UpdateLogGroupIn is the UpdateLogGroup request body.

type UpdateLogIn

type UpdateLogIn struct {
	Tags
	Name          *string     `json:"displayName"`
	Enabled       *bool       `json:"isEnabled"`
	Retention     *int        `json:"retentionDuration"`
	Configuration *ConfigWire `json:"configuration"`
}

UpdateLogIn is the UpdateLog request body.

type UpdateSavedSearchIn

type UpdateSavedSearchIn struct {
	Tags
	Name        *string `json:"name"`
	Description *string `json:"description"`
	Query       *string `json:"query"`
}

UpdateSavedSearchIn is the UpdateLogSavedSearch request body.

type WorkRequest

type WorkRequest struct {
	Accepted      time.Time `json:"accepted"`
	FinishAt      time.Time `json:"finishAt"`
	ID            string    `json:"id"`
	Operation     string    `json:"operation"`
	CompartmentID string    `json:"compartmentId"`
	EntityType    string    `json:"entityType"`
	EntityID      string    `json:"entityId"`
	EntityURI     string    `json:"entityUri"`
	Action        string    `json:"action"`
	Seq           int64     `json:"seq"`
}

WorkRequest records an asynchronous admin operation.

type WorkRequestWire

type WorkRequestWire struct {
	TimeAccepted    time.Time        `json:"timeAccepted"`
	TimeStarted     *time.Time       `json:"timeStarted,omitempty"`
	TimeFinished    *time.Time       `json:"timeFinished,omitempty"`
	OperationType   string           `json:"operationType"`
	Status          string           `json:"status"`
	ID              string           `json:"id"`
	CompartmentID   string           `json:"compartmentId"`
	Resources       []wrResourceWire `json:"resources"`
	PercentComplete float32          `json:"percentComplete"`
}

WorkRequestWire is the work request shape shared by Get and List.

Jump to

Keyboard shortcuts

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