cmd

package
v0.0.0-...-5704353 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright 2020 Google LLC

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.

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.

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

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 Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type AlbumCount

type AlbumCount struct {
	Album ArtistAlbum
	Count int64
}

type Analyser

type Analyser interface {
	GetResults(dbPath string, user string, start time.Time, end time.Time) (Analysis, error)

	GetName() string
}

type AnalyserConfig

type AnalyserConfig struct {
	// Number of results to return, default is all results.
	NumToReturn int

	// Only return results with more listens than this. Default is all results.
	FilterThreshold int64
}

type Analysis

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

func (Analysis) String

func (a Analysis) String() string

type ArtistAlbum

type ArtistAlbum struct {
	Artist string
	Album  string
}

type ArtistCount

type ArtistCount struct {
	Artist string
	Count  int64
}

type NewAlbumsAnalyzer

type NewAlbumsAnalyzer struct {
	Config AnalyserConfig
}

func (NewAlbumsAnalyzer) GetName

func (t NewAlbumsAnalyzer) GetName() string

func (NewAlbumsAnalyzer) GetResults

func (t NewAlbumsAnalyzer) GetResults(dbPath string, user string, start time.Time, end time.Time) (analysis Analysis, err error)

func (NewAlbumsAnalyzer) SetConfig

type NewArtistsAnalyzer

type NewArtistsAnalyzer struct {
	Config AnalyserConfig
}

func (NewArtistsAnalyzer) GetName

func (t NewArtistsAnalyzer) GetName() string

func (NewArtistsAnalyzer) GetResults

func (t NewArtistsAnalyzer) GetResults(dbPath string, user string, start time.Time, end time.Time) (analysis Analysis, err error)

func (NewArtistsAnalyzer) SetConfig

type ParsedDate

type ParsedDate struct {
	Date  time.Time
	Year  bool
	Month bool
	Day   bool
}

type SendEmailConfig

type SendEmailConfig struct {
	DbPath     string
	User       string
	From       string
	To         string
	ReportName string
	Types      []string
	DryRun     bool
}

type SendReportsConfig

type SendReportsConfig struct {
	DbPath string
	From   string
	DryRun bool
}

type TopAlbumsAnalyzer

type TopAlbumsAnalyzer struct {
	Config AnalyserConfig
}

func (TopAlbumsAnalyzer) GetName

func (t TopAlbumsAnalyzer) GetName() string

func (TopAlbumsAnalyzer) GetResults

func (t TopAlbumsAnalyzer) GetResults(dbPath string, user string, start time.Time, end time.Time) (analysis Analysis, err error)

func (TopAlbumsAnalyzer) SetConfig

type TopArtistsAnalyzer

type TopArtistsAnalyzer struct {
	Config AnalyserConfig
}

func (TopArtistsAnalyzer) GetName

func (t TopArtistsAnalyzer) GetName() string

func (TopArtistsAnalyzer) GetResults

func (t TopArtistsAnalyzer) GetResults(dbPath string, user string, start time.Time, end time.Time) (analysis Analysis, err error)

func (TopArtistsAnalyzer) SetConfig

type UpdateConfig

type UpdateConfig struct {
	DbPath string
	User   string
	After  string
	Force  bool
}

Jump to

Keyboard shortcuts

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