cmd

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Index

Constants

View Source
const (
	APIKEY_ENV_NAME   = "RSPACE_API_KEY"
	BASE_URL_ENV_NAME = "RSPACE_URL"
)
View Source
const (
	DISPLAY_TIMESTAMP_WIDTH = 16
)

Variables

View Source
var PageSize int
View Source
var Quiet bool

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.

func NewOperatorCommand

func NewOperatorCommand() *cobra.Command

NewOperatorCommand returns the `quarks-job` command.

func NewStatusCmd

func NewStatusCmd() *cobra.Command

Types

type ActivityListFormatter

type ActivityListFormatter struct {
	*rspace.ActivityList
}

func (*ActivityListFormatter) ToJson

func (ds *ActivityListFormatter) ToJson() string

func (*ActivityListFormatter) ToQuiet

func (ds *ActivityListFormatter) ToQuiet() []identifiable

func (*ActivityListFormatter) ToTable

func (ds *ActivityListFormatter) ToTable() *TableResult

type Context

type Context struct {
	WebClient *rspace.RsWebClient
	Writer    io.Writer
	ErrWriter io.Writer
	Format    outputFmt
}

Context maintains references to the webClient and result Writers

type DocArrayList

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

type DocArrayListFormatter

type DocArrayListFormatter struct {
	DocArrayList
}

func (*DocArrayListFormatter) ToJson

func (fmt *DocArrayListFormatter) ToJson() string

func (*DocArrayListFormatter) ToQuiet

func (fmt *DocArrayListFormatter) ToQuiet() []identifiable

func (*DocArrayListFormatter) ToTable

func (fmt *DocArrayListFormatter) ToTable() *TableResult

type DocClient

type DocClient interface {
	NewBasicDocumentWithContent(name, tags, content string) (*rspace.Document, error)

	NewDocumentWithContent(post *rspace.DocumentPost) (*rspace.Document, error)
}

type DocListFormatter

type DocListFormatter struct {
	*rspace.DocumentList
}

func (*DocListFormatter) ToJson

func (ds *DocListFormatter) ToJson() string

func (*DocListFormatter) ToQuiet

func (ds *DocListFormatter) ToQuiet() []identifiable

func (*DocListFormatter) ToTable

func (ds *DocListFormatter) ToTable() *TableResult

type FileArrayList

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

type FileInfoSummary added in v0.0.18

type FileInfoSummary struct {
	*rspace.FileInfo
}
func (summary *FileInfoSummary) FileIdLink() template.HTML
func (summary *FileInfoSummary) GlobalIdLink() template.HTML

type FileListFormatter

type FileListFormatter struct {
	FileArrayList
}

func (*FileListFormatter) ToJson

func (fs *FileListFormatter) ToJson() string

func (*FileListFormatter) ToQuiet

func (ds *FileListFormatter) ToQuiet() []identifiable

func (*FileListFormatter) ToTable

func (ds *FileListFormatter) ToTable() *TableResult

type FolderListFormatter

type FolderListFormatter struct {
	*rspace.FolderList
}

func (*FolderListFormatter) ToJson

func (ds *FolderListFormatter) ToJson() string

func (*FolderListFormatter) ToQuiet

func (ds *FolderListFormatter) ToQuiet() []identifiable

func (*FolderListFormatter) ToTable

func (ds *FolderListFormatter) ToTable() *TableResult

type FormListFormatter

type FormListFormatter struct {
	*rspace.FormList
}

func (*FormListFormatter) ToJson

func (fs *FormListFormatter) ToJson() string

func (*FormListFormatter) ToQuiet

func (ds *FormListFormatter) ToQuiet() []identifiable

func (*FormListFormatter) ToTable

func (ds *FormListFormatter) ToTable() *TableResult

type GroupListFormatter

type GroupListFormatter struct {
	*rspace.GroupList
}

func (*GroupListFormatter) ToJson

func (fs *GroupListFormatter) ToJson() string

func (*GroupListFormatter) ToQuiet

func (ds *GroupListFormatter) ToQuiet() []identifiable

func (*GroupListFormatter) ToTable

func (ds *GroupListFormatter) ToTable() *TableResult

type JobFormatter added in v0.0.18

type JobFormatter struct {
	*rspace.Job
}

func (*JobFormatter) ToJson added in v0.0.18

func (fs *JobFormatter) ToJson() string

func (*JobFormatter) ToQuiet added in v0.0.18

func (fs *JobFormatter) ToQuiet() []identifiable

func (*JobFormatter) ToTable added in v0.0.18

func (fs *JobFormatter) ToTable() *TableResult

type ResultListFormatter

type ResultListFormatter interface {
	ToJson() string
	ToTable() *TableResult
	ToQuiet() []identifiable
}

type ShareInfoListFormatter

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

func (*ShareInfoListFormatter) ToJson

func (fs *ShareInfoListFormatter) ToJson() string

func (*ShareInfoListFormatter) ToQuiet

func (ds *ShareInfoListFormatter) ToQuiet() []identifiable

func (*ShareInfoListFormatter) ToTable

func (ds *ShareInfoListFormatter) ToTable() *TableResult

type StatusCli

type StatusCli interface {
	Status() (*rspace.Status, error)
}

type TableResult

type TableResult struct {
	Headers []columnDef
	Content [][]string
}

type UserListFormatter

type UserListFormatter struct {
	*rspace.UserList
}

func (*UserListFormatter) ToJson

func (fs *UserListFormatter) ToJson() string

func (*UserListFormatter) ToQuiet

func (ds *UserListFormatter) ToQuiet() []identifiable

func (*UserListFormatter) ToTable

func (ds *UserListFormatter) ToTable() *TableResult

Jump to

Keyboard shortcuts

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