o2m

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright © 2020 Marvin

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherOracleOverview

func GatherOracleOverview(schemaName []string, oracle *oracle.Oracle, reportUser, reportName string) (*ReportOverview, *ReportSchema, error)

func GenNewHTMLReport

func GenNewHTMLReport(
	reportOverview *ReportOverview, reportSchema *ReportSchema,
	reportType *ReportType, reportCheck *ReportCheck, file *os.File) error

Types

type ListSchemaActiveSession

type ListSchemaActiveSession struct {
	Rownum         string
	DBID           string
	InstanceNumber string
	SampleID       string
	SampleTime     string
	SessionCounts  string
}

func GatherOracleMaxActiveSessionCount

func GatherOracleMaxActiveSessionCount(oracle *oracle.Oracle) ([]ListSchemaActiveSession, error)

type ListSchemaCodeType

type ListSchemaCodeType struct {
	Schema   string
	CodeName string
	CodeType string
	Counts   string
}

func GatherOracleSchemeCodeType

func GatherOracleSchemeCodeType(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaCodeType, error)

type ListSchemaConstraintType

type ListSchemaConstraintType struct {
	Schema         string
	ConstraintType string
	Counts         string
}

func GatherOracleConstraintType

func GatherOracleConstraintType(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaConstraintType, error)

type ListSchemaIndexType

type ListSchemaIndexType struct {
	Schema    string
	IndexType string
	Counts    string
}

func GatherOracleSchemaIndexType

func GatherOracleSchemaIndexType(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaIndexType, error)

Oracle Database Type

type ListSchemaPartitionTableCountsCheck

type ListSchemaPartitionTableCountsCheck struct {
	Schema          string
	TableName       string
	PartitionCounts string
}

func GatherOraclePartitionTableCountsCheck

func GatherOraclePartitionTableCountsCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaPartitionTableCountsCheck, error)

Oracle Database Check

type ListSchemaSequenceNameLengthCheck

type ListSchemaSequenceNameLengthCheck struct {
	Schema       string
	SequenceName string
	OrderFlag    string
}

func GatherOracleSequenceNameLengthCheck

func GatherOracleSequenceNameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaSequenceNameLengthCheck, error)

type ListSchemaSynonymType

type ListSchemaSynonymType struct {
	Schema     string
	TableOwner string
	Counts     string
}

func GatherOracleSchemaSynonymType

func GatherOracleSchemaSynonymType(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaSynonymType, error)

type ListSchemaTableAndIndexCountsCheck

type ListSchemaTableAndIndexCountsCheck struct {
	Schema    string
	TableName string
	Counts    string
}

func GatherOracleTableColumnCountsCheck

func GatherOracleTableColumnCountsCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableAndIndexCountsCheck, error)

func GatherOracleTableIndexCountsCheck

func GatherOracleTableIndexCountsCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableAndIndexCountsCheck, error)

type ListSchemaTableAvgRowLength

type ListSchemaTableAvgRowLength struct {
	Schema       string
	TableName    string
	AvgRowLength string
}

func GatherOracleSchemaTableAvgRowLength

func GatherOracleSchemaTableAvgRowLength(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableAvgRowLength, error)

type ListSchemaTableColumnNameLengthCheck

type ListSchemaTableColumnNameLengthCheck struct {
	Schema     string
	TableName  string
	ColumnName string
}

func GatherOracleColumnNameLengthCheck

func GatherOracleColumnNameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableColumnNameLengthCheck, error)

type ListSchemaTableColumnTypeAndMaxLength

type ListSchemaTableColumnTypeAndMaxLength struct {
	Schema        string
	DataType      string
	Counts        string
	MaxDataLength string
}

func GatherOracleSchemaColumnTypeAndMaxLength

func GatherOracleSchemaColumnTypeAndMaxLength(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableColumnTypeAndMaxLength, error)

type ListSchemaTableIndexNameLengthCheck

type ListSchemaTableIndexNameLengthCheck struct {
	Schema    string
	TableName string
	IndexName string
}

func GatherOracleIndexNameLengthCheck

func GatherOracleIndexNameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableIndexNameLengthCheck, error)

type ListSchemaTableIndexRowLengthCheck

type ListSchemaTableIndexRowLengthCheck struct {
	Schema       string
	TableName    string
	IndexName    string
	ColumnLength string
}

func GatherOracleTableIndexRowLengthCheck

func GatherOracleTableIndexRowLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableIndexRowLengthCheck, error)

type ListSchemaTableNameLengthCheck

type ListSchemaTableNameLengthCheck struct {
	Schema    string
	TableName string
}

func GatherOracleTableNameLengthCheck

func GatherOracleTableNameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableNameLengthCheck, error)

type ListSchemaTableNumberTypeCheck

type ListSchemaTableNumberTypeCheck struct {
	Schema        string
	TableName     string
	ColumnName    string
	DataPrecision string
	DataScale     string
}

func GatherOracleTableNumberTypeCheck

func GatherOracleTableNumberTypeCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableNumberTypeCheck, error)

type ListSchemaTableObjectCounts

type ListSchemaTableObjectCounts struct {
	Schema     string
	ObjectType string
	Counts     string
}

func GatherOracleSchemaObjectOverview

func GatherOracleSchemaObjectOverview(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableObjectCounts, error)

type ListSchemaTablePartitionType

type ListSchemaTablePartitionType struct {
	Schema           string
	TableName        string
	PartitionType    string
	SubPartitionType string
}

func GatherOracleSchemaPartitionType

func GatherOracleSchemaPartitionType(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTablePartitionType, error)

type ListSchemaTableRowLengthCheck

type ListSchemaTableRowLengthCheck struct {
	Schema       string
	TableName    string
	AvgRowLength string
}

func GatherOracleTableRowLengthCheck

func GatherOracleTableRowLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableRowLengthCheck, error)

type ListSchemaTableRowsTOP

type ListSchemaTableRowsTOP struct {
	Schema    string
	TableName string
	TableType string
	TableSize string
}

func GatherOracleSchemaTableRowsTOP

func GatherOracleSchemaTableRowsTOP(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableRowsTOP, error)

type ListSchemaTableSizeData

type ListSchemaTableSizeData struct {
	Schema        string
	TableSize     string
	IndexSize     string
	LobTableSize  string
	LobIndexSize  string
	AllTablesRows string
}

func GatherOracleSchemaOverview

func GatherOracleSchemaOverview(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTableSizeData, error)

type ListSchemaTemporaryTableCounts

type ListSchemaTemporaryTableCounts struct {
	Schema string
	Counts string
}

func GatherOracleSchemaTemporaryTable

func GatherOracleSchemaTemporaryTable(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaTemporaryTableCounts, error)

type ListSchemaViewNameLengthCheck

type ListSchemaViewNameLengthCheck struct {
	Schema   string
	ViewName string
	ReadOnly string
}

func GatherOracleViewNameLengthCheck

func GatherOracleViewNameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListSchemaViewNameLengthCheck, error)

type ListUsernameLengthCheck

type ListUsernameLengthCheck struct {
	Schema        string
	AccountStatus string
	Created       string
}

func GatherOracleUsernameLengthCheck

func GatherOracleUsernameLengthCheck(schemaName []string, oracle *oracle.Oracle) ([]ListUsernameLengthCheck, error)

type Report

type Report struct {
	// contains filtered or unexported fields
}

func NewReport

func NewReport(ctx context.Context, cfg *config.Config, oracle *oracle.Oracle) *Report

func (*Report) Assess

func (r *Report) Assess() error

type ReportCheck

type ReportCheck struct {
	ListSchemaPartitionTableCountsCheck  []ListSchemaPartitionTableCountsCheck
	ListSchemaTableRowLengthCheck        []ListSchemaTableRowLengthCheck
	ListSchemaTableIndexRowLengthCheck   []ListSchemaTableIndexRowLengthCheck
	ListSchemaTableColumnCountsCheck     []ListSchemaTableAndIndexCountsCheck
	ListSchemaIndexCountsCheck           []ListSchemaTableAndIndexCountsCheck
	ListSchemaTableNumberTypeCheck       []ListSchemaTableNumberTypeCheck
	ListUsernameLengthCheck              []ListUsernameLengthCheck
	ListSchemaTableNameLengthCheck       []ListSchemaTableNameLengthCheck
	ListSchemaTableColumnNameLengthCheck []ListSchemaTableColumnNameLengthCheck
	ListSchemaTableIndexNameLengthCheck  []ListSchemaTableIndexNameLengthCheck
	ListSchemaViewNameLengthCheck        []ListSchemaViewNameLengthCheck
	ListSchemaSequenceNameLengthCheck    []ListSchemaSequenceNameLengthCheck
}

func GatherOracleCheck

func GatherOracleCheck(schemaName []string, oracle *oracle.Oracle) (*ReportCheck, error)

type ReportOverview

type ReportOverview struct {
	ReportName        string
	ReportUser        string
	HostName          string
	PlatformName      string
	DBName            string
	GlobalDBName      string
	ClusterDB         string
	ClusterDBInstance string
	InstanceName      string
	InstanceNumber    string
	ThreadNumber      string
	BlockSize         string
	TotalUsedSize     string
	HostCPUS          string
	HostMem           string
	CharacterSet      string
}

func GatherOracleDBOverview

func GatherOracleDBOverview(oracle *oracle.Oracle, reportName, reportUser string) (*ReportOverview, error)

Oracle Database Overview

type ReportSchema

type ReportSchema struct {
	ListSchemaActiveSession               []ListSchemaActiveSession
	ListSchemaTableSizeData               []ListSchemaTableSizeData
	ListSchemaTableRowsTOP                []ListSchemaTableRowsTOP
	ListSchemaTableObjectCounts           []ListSchemaTableObjectCounts
	ListSchemaTablePartitionType          []ListSchemaTablePartitionType
	ListSchemaTableColumnTypeAndMaxLength []ListSchemaTableColumnTypeAndMaxLength
	ListSchemaTableAvgRowLength           []ListSchemaTableAvgRowLength
	ListSchemaTemporaryTableCounts        []ListSchemaTemporaryTableCounts
}

type ReportType

type ReportType struct {
	ListSchemaIndexType      []ListSchemaIndexType
	ListSchemaConstraintType []ListSchemaConstraintType
	ListSchemaCodeType       []ListSchemaCodeType
	ListSchemaSynonymType    []ListSchemaSynonymType
}

func GatherOracleType

func GatherOracleType(schemaName []string, oracle *oracle.Oracle) (*ReportType, error)

Jump to

Keyboard shortcuts

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