slackbot

package
v0.0.0-...-287d054 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2020 The Knative Authors

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

View Source
const (
	VolumeName = "slackbot-binding"
	MountPath  = "/var/bindings/slackbot"
)

Variables

This section is empty.

Functions

func AccessToken

func AccessToken() (string, error)

AccessToken reads the file named accessToken that is mounted by the SlackBinding.

func New

func New(ctx context.Context) (*slack.Client, error)

New instantiates a new slack client from the access token from the SlackBinding

func ReadKey

func ReadKey(key string) (string, error)

ReadKey may be used to read keys from the secret bound by the SlackBinding.

Types

type SlackbotBinding

type SlackbotBinding struct {
	Secret corev1.LocalObjectReference
}

func (*SlackbotBinding) DeepCopyObject

func (sb *SlackbotBinding) DeepCopyObject() runtime.Object

func (*SlackbotBinding) Do

func (sb *SlackbotBinding) Do(ctx context.Context, ps *duckv1.WithPod)

func (*SlackbotBinding) GetAnnotations

func (sb *SlackbotBinding) GetAnnotations() map[string]string

func (*SlackbotBinding) GetBindingStatus

func (sb *SlackbotBinding) GetBindingStatus() duck.BindableStatus

func (*SlackbotBinding) GetClusterName

func (sb *SlackbotBinding) GetClusterName() string

func (*SlackbotBinding) GetCreationTimestamp

func (sb *SlackbotBinding) GetCreationTimestamp() v1.Time

func (*SlackbotBinding) GetDeletionGracePeriodSeconds

func (sb *SlackbotBinding) GetDeletionGracePeriodSeconds() *int64

func (*SlackbotBinding) GetDeletionTimestamp

func (sb *SlackbotBinding) GetDeletionTimestamp() *v1.Time

func (*SlackbotBinding) GetFinalizers

func (sb *SlackbotBinding) GetFinalizers() []string

func (*SlackbotBinding) GetGenerateName

func (sb *SlackbotBinding) GetGenerateName() string

func (*SlackbotBinding) GetGeneration

func (sb *SlackbotBinding) GetGeneration() int64

func (*SlackbotBinding) GetGroupVersionKind

func (sb *SlackbotBinding) GetGroupVersionKind() schema.GroupVersionKind

func (*SlackbotBinding) GetLabels

func (sb *SlackbotBinding) GetLabels() map[string]string

func (*SlackbotBinding) GetManagedFields

func (sb *SlackbotBinding) GetManagedFields() []v1.ManagedFieldsEntry

func (*SlackbotBinding) GetName

func (sb *SlackbotBinding) GetName() string

func (*SlackbotBinding) GetNamespace

func (sb *SlackbotBinding) GetNamespace() string

func (*SlackbotBinding) GetObjectKind

func (sb *SlackbotBinding) GetObjectKind() schema.ObjectKind

func (*SlackbotBinding) GetObjectMeta

func (sb *SlackbotBinding) GetObjectMeta() v1.Object

func (*SlackbotBinding) GetOwnerReferences

func (sb *SlackbotBinding) GetOwnerReferences() []v1.OwnerReference

func (*SlackbotBinding) GetResourceVersion

func (sb *SlackbotBinding) GetResourceVersion() string
func (sb *SlackbotBinding) GetSelfLink() string

func (*SlackbotBinding) GetSubject

func (sb *SlackbotBinding) GetSubject() tracker.Reference

func (*SlackbotBinding) GetUID

func (sb *SlackbotBinding) GetUID() types.UID

func (*SlackbotBinding) GroupVersionKind

func (sb *SlackbotBinding) GroupVersionKind() schema.GroupVersionKind

func (*SlackbotBinding) SetAnnotations

func (sb *SlackbotBinding) SetAnnotations(annotations map[string]string)

func (*SlackbotBinding) SetClusterName

func (sb *SlackbotBinding) SetClusterName(clusterName string)

func (*SlackbotBinding) SetCreationTimestamp

func (sb *SlackbotBinding) SetCreationTimestamp(timestamp v1.Time)

func (*SlackbotBinding) SetDeletionGracePeriodSeconds

func (sb *SlackbotBinding) SetDeletionGracePeriodSeconds(*int64)

func (*SlackbotBinding) SetDeletionTimestamp

func (sb *SlackbotBinding) SetDeletionTimestamp(timestamp *v1.Time)

func (*SlackbotBinding) SetFinalizers

func (sb *SlackbotBinding) SetFinalizers(finalizers []string)

func (*SlackbotBinding) SetGenerateName

func (sb *SlackbotBinding) SetGenerateName(name string)

func (*SlackbotBinding) SetGeneration

func (sb *SlackbotBinding) SetGeneration(generation int64)

func (*SlackbotBinding) SetGroupVersionKind

func (sb *SlackbotBinding) SetGroupVersionKind(gvk schema.GroupVersionKind)

func (*SlackbotBinding) SetLabels

func (sb *SlackbotBinding) SetLabels(labels map[string]string)

func (*SlackbotBinding) SetManagedFields

func (sb *SlackbotBinding) SetManagedFields(managedFields []v1.ManagedFieldsEntry)

func (*SlackbotBinding) SetName

func (sb *SlackbotBinding) SetName(name string)

func (*SlackbotBinding) SetNamespace

func (sb *SlackbotBinding) SetNamespace(namespace string)

func (*SlackbotBinding) SetOwnerReferences

func (sb *SlackbotBinding) SetOwnerReferences([]v1.OwnerReference)

func (*SlackbotBinding) SetResourceVersion

func (sb *SlackbotBinding) SetResourceVersion(version string)
func (sb *SlackbotBinding) SetSelfLink(selfLink string)

func (*SlackbotBinding) SetUID

func (sb *SlackbotBinding) SetUID(uid types.UID)

func (*SlackbotBinding) Undo

func (sb *SlackbotBinding) Undo(ctx context.Context, ps *duckv1.WithPod)

Jump to

Keyboard shortcuts

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