// Copyright 2024 Matthew Rich . All rights reserved. // Container resource package resource import ( "fmt" "errors" ) type ContainerLogStreamType byte const ( ContainerLogStreamStdin ContainerLogStreamType = 0x0 ContainerLogStreamStdout ContainerLogStreamType = 0x1 ContainerLogStreamStderr ContainerLogStreamType = 0x2 ) var ( ErrContainerLogInvalidStreamType error = errors.New("Invalid container log stream type") ) func (s ContainerLogStreamType) Validate() error { switch s { case ContainerLogStreamStdin, ContainerLogStreamStdout, ContainerLogStreamStderr: return nil } return fmt.Errorf("%w: %d", ErrContainerLogInvalidStreamType, s) }