cmd

package
v0.0.0-...-c56baf2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright © 2021 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.

Copyright © 2021 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executes the root command.

func TruncatePath

func TruncatePath(path string) string

TruncatePath takes a full path and returns the most filename and one directory above For example, if you pass in /home/monkey/stash/banana/peel.txt this function will return /banana/peel.txt

Types

type Config

type Config struct {
	Repo Repo `yaml:"repo"`
}

type Photo

type Photo struct {
	ID         int
	InsertedAt time.Time
	UpdatedAt  time.Time
	RepoID     uuid.UUID
	ShaHash    string
	SourcePath string
	Path       string
	DateTaken  time.Time
	Status     string
}

type Repo

type Repo struct {
	ID uuid.UUID `yaml:"id"`
}

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Set is a struct for the set hash map which just tracks whether the index exists. The mutex abstraction is required.

func (*Set) Check

func (pm *Set) Check(s string) bool

func (*Set) Insert

func (pm *Set) Insert(s string)

Jump to

Keyboard shortcuts

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